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 10:28Victor MerckléVictor MerckléScore: 34,878Success
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 10:3134,082176,430,894163,827,0003,178,0002,179,072stderr
2Jul 7, 2026 10:3134,695179,374,458167,796,0002,214,0002,138,112stderr
3Jul 7, 2026 10:3134,753179,706,166168,097,0002,193,0002,138,112stderr
4Jul 7, 2026 10:3134,761179,928,505168,319,0002,014,0002,134,016stderr
5Jul 7, 2026 10:3134,878180,320,202168,890,0002,014,0002,134,016stderr
6Jul 7, 2026 10:3134,941180,650,395169,001,0002,214,0002,134,016stderr
7Jul 7, 2026 10:3137,698195,744,609173,341,00011,381,0002,134,016stderr
8Jul 7, 2026 10:3138,640198,726,414173,374,00015,963,0002,134,016stderr
9Jul 7, 2026 10:31103,5181,921,451,620291,919,000215,323,0002,134,016stderr