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 listSep 2, 2026 02:25Victor MerckléVictor MerckléScore: 27,080Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 2, 2026 02:2526,943140,406,922130,989,0001,034,0002,117,632stderr
2Sep 2, 2026 02:2527,004140,760,223131,295,0001,029,0002,117,632stderr
3Sep 2, 2026 02:2527,039140,957,516131,399,0001,095,0002,117,632stderr
4Sep 2, 2026 02:2527,046140,978,922131,431,0001,099,0002,117,632stderr
5Sep 2, 2026 02:2527,080141,108,812131,683,0001,009,0002,117,632stderr
6Sep 2, 2026 02:2527,134141,519,528131,860,0001,099,0002,117,632stderr
7Sep 2, 2026 02:2527,134141,343,066131,858,0001,099,0002,117,632stderr
8Sep 2, 2026 02:2527,135141,410,925131,921,0001,043,0002,117,632stderr
9Sep 2, 2026 02:2527,142141,390,051131,887,0001,111,0002,117,632stderr