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 14, 2025 20:45Valentin KofmanValentin KofmanScore: 149,294Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 14, 2025 20:45147,723749,636,054720,845,0002,999,0002,260,992
2Jul 14, 2025 20:45147,789754,555,509721,168,0003,000,0002,285,568
3Jul 14, 2025 20:45149,218760,434,383729,169,0002,000,0002,265,088
4Jul 14, 2025 20:45149,270760,131,180728,426,0002,997,0002,260,992
5Jul 14, 2025 20:45149,294757,237,665728,545,0002,998,0002,289,664
6Jul 14, 2025 20:45149,306759,144,456728,602,0002,998,0002,371,584
7Jul 14, 2025 20:45150,257766,782,085734,260,0002,000,0002,289,664
8Jul 14, 2025 20:45182,983919,296,243894,616,0001,999,0002,265,088
9Jul 14, 2025 20:45222,0841,116,432,3821,085,213,0002,997,0002,281,472