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 7, 2026 09:49Victor MerckléVictor MerckléScore: 38,785Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 7, 2026 09:5038,424197,717,027175,182,00013,100,0002,142,208stderr
2Jul 7, 2026 09:5038,430198,333,342175,071,00013,236,0002,142,208stderr
3Jul 7, 2026 09:5038,652199,086,504175,850,00013,547,0002,142,208stderr
4Jul 7, 2026 09:5038,771198,079,925175,681,00014,300,0002,121,728stderr
5Jul 7, 2026 09:5038,785199,939,905175,742,00014,305,0002,142,208stderr
6Jul 7, 2026 09:5038,803199,986,459175,947,00014,191,0002,142,208stderr
7Jul 7, 2026 09:5040,807210,927,604179,768,00020,191,00049,152stderr
8Jul 7, 2026 09:5041,137212,018,944179,856,00021,719,00049,152stderr
9Jul 7, 2026 09:5041,449214,378,153182,725,00020,379,0002,142,208stderr