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 11, 2025 12:20zielajzielajScore: 53,877Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 11, 2025 12:2053,814289,719,412261,693,0001,997,0002,428,928
2Jul 11, 2025 12:2053,873285,659,255262,977,000999,0002,486,272
3Jul 11, 2025 12:2053,874285,208,369262,986,000999,0002,469,888
4Jul 11, 2025 12:2053,876291,153,774262,995,000999,0002,420,736
5Jul 11, 2025 12:2053,877288,145,790262,999,000999,0002,428,928
6Jul 11, 2025 12:2053,881288,605,215263,017,0001,000,0002,441,216
7Jul 11, 2025 12:2055,133289,412,003268,152,0002,001,0002,424,832
8Jul 11, 2025 12:2055,602298,354,646268,460,0003,991,0002,433,024
9Jul 11, 2025 12:2056,250301,704,545274,625,000998,0002,424,832