Format integers Sergey Svistunov

Compute a checksum over the decimal representations of binary integers as fast as possible.

Input: 250 000 000 uint32 values in little-endian binary on STDIN (4 bytes each).

Output: A uint64 checksum computed as:

CRC = sum of number_crc(n) for each n

where number_crc(n) converts n to its decimal string and sums ascii(digit) * position over each digit (0-indexed from the left).

Example: For n = 42, the decimal string is "42", so number_crc(42) = ascii('4') * 0 + ascii('2') * 1 = 52 * 0 + 50 * 1 = 50.

Back to listJun 28, 2026 11:10Victor MerckléVictor MerckléScore: 72,045Success
Source Code

Source code access is restricted. Log in to request access.

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 28, 2026 11:1171,903360,242,027350,284,0002,044,0002,113,536
2Jun 28, 2026 11:1171,924360,444,643350,377,0002,053,0002,113,536
3Jun 28, 2026 11:1171,927360,679,771350,267,0002,178,0002,113,536
4Jun 28, 2026 11:1172,011360,755,445350,836,0002,022,0002,113,536
5Jun 28, 2026 11:1172,045360,914,301350,845,0002,180,0002,113,536
6Jun 28, 2026 11:1172,060361,075,005350,983,0002,113,0002,113,536
7Jun 28, 2026 11:1172,635363,867,583353,877,0002,038,0002,113,536
8Jun 28, 2026 11:1172,781364,495,927354,616,0002,011,0002,113,536
9Jun 28, 2026 11:1172,807364,653,703354,656,0002,102,0002,113,536