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 listMay 12, 2026 20:14Victor MerckléVictor MerckléScore: 154,793Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 12, 2026 20:20154,753768,416,683754,052,0004,241,0002,138,112
2May 12, 2026 20:20154,769768,445,249754,101,0004,268,0002,138,112
3May 12, 2026 20:20154,772771,323,110754,089,0004,298,0002,138,112
4May 12, 2026 20:20154,791766,216,855754,312,0004,168,0002,138,112
5May 12, 2026 20:20154,793765,980,296754,219,0004,270,0002,138,112
6May 12, 2026 20:20154,794768,591,691754,465,0004,028,0002,138,112
7May 12, 2026 20:20154,806768,716,621754,365,0004,186,0002,138,112
8May 12, 2026 20:20154,821767,419,723754,584,0004,041,0002,138,112
9May 12, 2026 20:20154,823768,789,518754,584,0004,049,0002,138,112