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 listSep 25, 2026 17:08Andrew EpsteinAndrew EpsteinScore: 30,578Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 25, 2026 17:0930,570160,227,320148,682,0001,114,0002,113,536
2Sep 25, 2026 17:0930,571160,254,250148,700,0001,101,0002,113,536
3Sep 25, 2026 17:0930,572160,310,147148,692,0001,115,0002,113,536
4Sep 25, 2026 17:0930,573160,200,114148,701,0001,107,0002,113,536
5Sep 25, 2026 17:0930,578160,883,736148,725,0001,108,0002,113,536
6Sep 25, 2026 17:0930,581160,957,196148,717,0001,132,0002,113,536
7Sep 25, 2026 17:0930,584160,992,823148,733,0001,130,0002,113,536
8Sep 25, 2026 17:0930,611160,476,992148,819,0001,178,0002,113,536
9Sep 25, 2026 17:0930,696170,539,076149,160,0001,254,0002,113,536