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 11, 2025 20:29Daniel NeumannDaniel NeumannScore: 1,610,576Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 11, 2025 20:291,608,9587,913,780,8337,761,973,000121,921,0002,281,472
2Jun 11, 2025 20:291,609,9597,929,551,0237,751,892,000136,909,0002,363,392
3Jun 11, 2025 20:291,610,3877,926,093,3117,762,964,000127,933,0002,285,568
4Jun 11, 2025 20:291,610,4477,919,823,2327,779,261,000111,931,0002,281,472
5Jun 11, 2025 20:291,610,5767,920,804,7997,758,891,000132,929,0002,359,296
6Jun 11, 2025 20:291,611,1337,924,044,4517,767,606,000126,944,0002,285,568
7Jun 11, 2025 20:291,611,1887,924,820,4097,771,888,000122,934,0002,281,472
8Jun 11, 2025 20:291,614,9157,940,152,9007,781,149,000131,934,0002,281,472
9Jun 11, 2025 20:291,632,1328,030,262,5977,853,511,000143,936,0002,285,568