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 21, 2025 13:54zielajzielajScore: 28,717Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 21, 2025 13:5428,680163,300,206140,532,00002,310,144
2Jul 21, 2025 13:5428,710166,922,864140,677,00002,318,336
3Jul 21, 2025 13:5428,714167,541,138138,703,0001,995,0002,326,528
4Jul 21, 2025 13:5428,715167,253,015138,707,0001,995,0002,449,408
5Jul 21, 2025 13:5428,717163,388,386139,708,0001,005,0002,461,696
6Jul 21, 2025 13:5428,718162,786,794139,722,000998,0002,461,696
7Jul 21, 2025 13:5428,721167,870,324137,738,0002,994,0002,314,240
8Jul 21, 2025 13:5428,725168,655,412139,754,000998,0002,293,760
9Jul 21, 2025 13:5429,931171,496,707143,667,0002,993,0002,478,080