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 7, 2026 16:58Victor MerckléVictor MerckléScore: 32,934Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 7, 2026 16:5832,308166,156,689156,278,0002,036,00024,576stderr
2Jul 7, 2026 16:5832,425166,800,173156,825,0002,058,0002,117,632stderr
3Jul 7, 2026 16:5832,606167,629,178158,765,0001,008,00024,576stderr
4Jul 7, 2026 16:5832,662167,938,454159,041,0001,007,00024,576stderr
5Jul 7, 2026 16:5832,934169,201,396160,375,0001,006,00024,576stderr
6Jul 7, 2026 16:5833,157170,320,635161,468,0001,006,00024,576stderr
7Jul 7, 2026 16:5835,739182,950,312162,274,00012,850,00024,576stderr
8Jul 7, 2026 16:5836,144184,937,834163,526,00013,582,00024,576stderr
9Jul 7, 2026 16:5836,162185,020,395164,630,00012,567,00024,576stderr