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 22:46Victor MerckléVictor MerckléScore: 30,630Success
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 22:4730,509157,394,054147,484,0002,014,0002,117,632stderr
2Jul 9, 2026 22:4730,553157,845,883148,702,0001,010,0002,117,632stderr
3Jul 9, 2026 22:4730,561157,607,222148,743,0001,009,0002,117,632stderr
4Jul 9, 2026 22:4730,610157,926,248147,942,0002,051,0002,117,632stderr
5Jul 9, 2026 22:4730,630158,272,555149,080,0001,010,0002,117,632stderr
6Jul 9, 2026 22:4730,649158,350,508148,163,0002,021,0002,117,632stderr
7Jul 9, 2026 22:4730,657158,117,150148,086,0002,135,0002,117,632stderr
8Jul 9, 2026 22:4730,701158,805,848149,428,0001,008,0002,117,632stderr
9Jul 9, 2026 22:4730,837159,156,207150,092,0001,010,0002,117,632stderr