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 2, 2026 18:43Victor MerckléVictor MerckléScore: 51,266Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 2, 2026 18:4450,997257,859,665247,877,0002,010,0002,117,632stderr
2Jul 2, 2026 18:4451,157258,598,103248,635,0002,039,0002,117,632stderr
3Jul 2, 2026 18:4451,201258,806,959248,772,0002,116,0002,117,632stderr
4Jul 2, 2026 18:4451,262259,127,451249,145,0002,040,0002,117,632stderr
5Jul 2, 2026 18:4451,266259,141,401249,146,0002,061,0002,117,632stderr
6Jul 2, 2026 18:4451,339259,823,429249,457,0002,107,0002,117,632stderr
7Jul 2, 2026 18:4451,342259,565,614249,560,0002,020,0002,117,632stderr
8Jul 2, 2026 18:4451,583262,066,512250,726,0002,034,0002,117,632stderr
9Jul 2, 2026 18:4451,742261,447,035251,498,0002,042,0002,117,632stderr