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 listAug 24, 2026 19:09Victor MerckléVictor MerckléScore: 28,264Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Aug 24, 2026 19:1028,150146,282,210135,817,0002,119,0002,117,632stderr
2Aug 24, 2026 19:1028,186146,480,591136,085,0002,029,0002,117,632stderr
3Aug 24, 2026 19:1028,201146,645,427136,181,0002,007,0002,117,632stderr
4Aug 24, 2026 19:1028,258146,845,163136,419,0002,046,0002,117,632stderr
5Aug 24, 2026 19:1028,264147,594,409136,472,0002,022,0002,117,632stderr
6Aug 24, 2026 19:1028,282146,989,461136,498,0002,084,0002,117,632stderr
7Aug 24, 2026 19:1028,352147,294,515137,916,0001,009,0002,117,632stderr
8Aug 24, 2026 19:1028,444147,833,724137,364,0002,015,0002,117,632stderr
9Aug 24, 2026 19:1028,651148,703,454139,382,0001,011,0002,117,632stderr