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 listDec 22, 2025 15:24Josu San MartinJosu San MartinScore: 237,782Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Dec 22, 2025 15:24236,9911,188,594,1251,158,259,0002,998,0002,326,528
2Dec 22, 2025 15:24237,1501,192,131,1751,158,041,0003,996,0002,281,472
3Dec 22, 2025 15:24237,2721,189,114,0891,157,635,0004,998,0002,342,912
4Dec 22, 2025 15:24237,7021,198,674,0451,162,743,0001,999,0002,314,240
5Dec 22, 2025 15:24237,7821,194,267,0231,162,133,0002,997,0002,441,216
6Dec 22, 2025 15:24238,0001,193,388,3361,163,203,0002,997,0002,449,408
7Dec 22, 2025 15:24240,5841,208,401,4371,173,867,0004,995,0002,281,472
8Dec 22, 2025 15:24240,6031,209,397,0661,174,959,0003,996,0002,342,912
9Dec 22, 2025 15:24240,6821,209,303,9701,175,344,0003,997,0002,285,568