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 listJul 5, 2026 20:12Victor MerckléVictor MerckléScore: 46,456Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 5, 2026 20:1346,161234,323,664222,919,0003,272,00024,576stderr
2Jul 5, 2026 20:1346,179234,316,505222,636,0003,645,00024,576stderr
3Jul 5, 2026 20:1346,372235,338,641223,599,0003,627,00024,576stderr
4Jul 5, 2026 20:1346,420235,588,090223,363,0004,096,00024,576stderr
5Jul 5, 2026 20:1346,456235,763,860223,644,0003,991,00024,576stderr
6Jul 5, 2026 20:1346,500235,884,332223,830,0004,021,00024,576stderr
7Jul 5, 2026 20:1346,632236,492,095224,185,0004,316,0002,117,632stderr
8Jul 5, 2026 20:1346,698236,868,120224,878,0003,943,0002,117,632stderr
9Jul 5, 2026 20:1347,003238,837,628226,417,0003,898,00024,576stderr