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 31, 2026 20:25Josu San MartinJosu San MartinScore: 46,873Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 31, 2026 20:2646,831239,622,719228,374,0001,100,0002,113,536
2Jul 31, 2026 20:2646,841241,707,690228,386,0001,136,0002,113,536
3Jul 31, 2026 20:2646,843239,641,199228,414,0001,119,0002,113,536
4Jul 31, 2026 20:2646,856240,464,439228,466,0001,129,0002,113,536
5Jul 31, 2026 20:2646,873239,864,596228,540,0001,139,0002,113,536
6Jul 31, 2026 20:2647,112240,967,783229,731,0001,121,0002,113,536
7Jul 31, 2026 20:2647,149241,258,688229,923,0001,110,0002,113,536
8Jul 31, 2026 20:2647,160241,082,664229,965,0001,122,0002,113,536
9Jul 31, 2026 20:2647,535243,041,590231,806,0001,116,0002,113,536