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 listMay 11, 2026 12:50Victor MerckléVictor MerckléScore: 100,547Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 11, 2026 12:5199,874501,038,826488,176,0001,209,0002,113,536
2May 11, 2026 12:5199,897500,058,956488,341,0001,157,0002,113,536
3May 11, 2026 12:51100,230501,802,044490,122,0001,005,0002,113,536
4May 11, 2026 12:51100,281501,568,715490,375,0001,004,0002,113,536
5May 11, 2026 12:51100,547502,398,696491,512,0001,169,0002,113,536
6May 11, 2026 12:51100,565503,545,612491,574,0001,198,0002,113,536
7May 11, 2026 12:51100,568502,357,425491,622,0001,165,0002,113,536
8May 11, 2026 12:51100,572505,923,394491,534,0001,273,0002,113,536
9May 11, 2026 12:51100,591502,469,067491,889,0001,007,0002,113,536