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 27, 2026 13:21Kevin HeaveyKevin HeaveyScore: 57,151Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 27, 2026 13:2956,834289,352,684268,788,0009,703,00020,480
2Jul 27, 2026 13:2956,850288,613,995269,206,0009,360,0002,113,536
3Jul 27, 2026 13:2956,921289,050,300269,381,0009,535,0002,113,536
4Jul 27, 2026 13:2957,017289,500,269269,010,00010,378,0002,113,536
5Jul 27, 2026 13:2957,151290,194,803268,953,00011,089,0002,113,536
6Jul 27, 2026 13:2957,156290,135,415268,811,00011,258,00020,480
7Jul 27, 2026 13:2957,158290,805,250268,796,00011,281,00020,480
8Jul 27, 2026 13:2957,162290,190,431268,805,00011,290,0002,113,536
9Jul 27, 2026 13:2957,228291,216,811268,717,00011,705,00020,480