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 10:22Victor MerckléVictor MerckléScore: 47,395Success
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 10:2345,615231,378,817221,205,0002,311,00024,576stderr
2Jul 7, 2026 10:2345,857232,751,360222,689,0002,011,00024,576stderr
3Jul 7, 2026 10:2346,009233,352,600223,432,0002,016,00024,576stderr
4Jul 7, 2026 10:2347,175239,324,708223,899,0007,262,00024,576stderr
5Jul 7, 2026 10:2347,395240,124,792224,526,0007,710,00024,576stderr
6Jul 7, 2026 10:2347,837242,368,991224,531,0009,871,00024,576stderr
7Jul 7, 2026 10:2348,269244,421,167225,369,00011,152,00024,576stderr
8Jul 7, 2026 10:2348,820247,503,116225,784,00013,437,00024,576stderr
9Jul 7, 2026 10:2349,004247,989,333226,989,00013,135,00024,576stderr