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 9, 2026 20:13Victor MerckléVictor MerckléScore: 31,002Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 9, 2026 20:1430,936159,710,672150,581,0001,008,0002,117,632stderr
2Jul 9, 2026 20:1430,942159,435,603150,607,0001,009,0002,117,632stderr
3Jul 9, 2026 20:1430,970159,587,336150,744,0001,009,0002,117,632stderr
4Jul 9, 2026 20:1430,993159,947,839150,858,0001,009,0002,117,632stderr
5Jul 9, 2026 20:1431,002160,021,287150,904,0001,010,0002,117,632stderr
6Jul 9, 2026 20:1431,062160,274,203151,193,0001,011,0002,117,632stderr
7Jul 9, 2026 20:1431,151160,488,251151,635,0001,009,0002,117,632stderr
8Jul 9, 2026 20:1431,406162,002,149152,885,0001,007,0002,117,632stderr
9Jul 9, 2026 20:1431,556162,899,805153,617,0001,009,0002,117,632stderr