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 listOct 11, 2025 22:40Martin StensgårdMartin StensgårdScore: 635,403Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 11, 2025 22:40635,3643,138,831,2083,112,284,000999,0002,387,968
2Oct 11, 2025 22:40635,3693,145,690,4033,111,308,0001,998,0002,379,776
3Oct 11, 2025 22:40635,3943,143,026,9993,112,432,000999,0002,392,064
4Oct 11, 2025 22:40635,4013,147,403,0813,112,466,000999,0002,392,064
5Oct 11, 2025 22:40635,4033,140,672,3833,111,479,0001,998,0002,256,896
6Oct 11, 2025 22:40635,4333,145,571,1193,112,621,000999,0002,256,896
7Oct 11, 2025 22:40635,4603,148,271,4843,111,757,0001,998,0002,260,992
8Oct 11, 2025 22:40635,5283,141,827,1463,111,091,0002,998,0002,260,992
9Oct 11, 2025 22:40635,5823,142,977,3873,112,352,0001,998,0002,387,968