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 listJan 23, 2026 01:22Josu San MartinJosu San MartinScore: 113,441Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jan 23, 2026 01:50113,268576,510,696552,013,0003,000,0002,281,472
2Jan 23, 2026 01:50113,320580,003,322553,266,0002,000,0002,281,472
3Jan 23, 2026 01:50113,331582,354,626553,327,0001,997,0002,510,848
4Jan 23, 2026 01:50113,359580,932,230552,462,0002,997,0002,502,656
5Jan 23, 2026 01:22113,364579,951,638552,485,0002,997,0002,281,472
6Jan 23, 2026 01:50113,400582,097,911553,661,0001,998,0002,510,848
7Jan 23, 2026 01:50113,441586,621,746551,864,0003,999,0002,338,816
8Jan 23, 2026 01:50113,514585,609,646554,218,0002,000,0002,281,472
9Jan 23, 2026 01:50113,699588,085,536555,127,0002,000,0002,281,472
10Jan 23, 2026 01:50113,807589,294,307553,655,0003,997,0002,281,472
11Jan 23, 2026 01:22113,813584,641,058555,686,0001,998,0002,281,472
12Jan 23, 2026 01:22114,094581,682,956557,062,0002,000,0002,281,472