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 6, 2026 23:49Victor MerckléVictor MerckléScore: 36,563Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 6, 2026 23:5035,978184,186,715171,038,0005,255,00024,576stderr
2Jul 6, 2026 23:5036,209185,257,955171,760,0005,666,00024,576stderr
3Jul 6, 2026 23:5036,393186,224,272172,564,0005,762,00024,576stderr
4Jul 6, 2026 23:5036,426186,516,787172,606,0005,884,00024,576stderr
5Jul 6, 2026 23:5036,563186,995,201173,966,0005,196,00024,576stderr
6Jul 6, 2026 23:5037,280190,517,414176,666,0006,007,00024,576stderr
7Jul 6, 2026 23:5037,666192,440,350173,978,00010,586,00024,576stderr
8Jul 6, 2026 23:5038,274195,396,716176,779,00010,764,00024,576stderr
9Jul 6, 2026 23:5038,519196,591,498177,785,00010,959,00024,576stderr