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 listJun 4, 2026 23:52Victor MerckléVictor MerckléScore: 63,133Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 4, 2026 23:5363,019316,204,232307,789,0001,006,0002,113,536
2Jun 4, 2026 23:5363,020316,580,613307,797,0001,005,0002,113,536
3Jun 4, 2026 23:5363,045316,329,122306,914,0002,010,0002,113,536
4Jun 4, 2026 23:5363,069316,605,000307,021,0002,019,0002,113,536
5Jun 4, 2026 23:5363,133316,987,567308,350,0001,006,0002,113,536
6Jun 4, 2026 23:5363,141316,866,218308,387,0001,005,0002,113,536
7Jun 4, 2026 23:5363,152316,952,786308,440,0001,006,0002,113,536
8Jun 4, 2026 23:5363,205317,251,178307,695,0002,012,0002,113,536
9Jun 4, 2026 23:5363,269317,540,321309,013,0001,006,0002,113,536