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 16, 2025 16:53Павел РатмановПавел РатмановScore: 346,673Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 16, 2025 16:53345,5381,722,279,7491,584,193,000108,944,0002,375,680
2Jun 16, 2025 16:53345,8761,718,917,7501,584,872,000109,921,0002,473,984
3Jun 16, 2025 16:53345,9331,717,973,4671,579,136,000115,936,0002,461,696
4Jun 16, 2025 16:53346,4611,723,366,4551,584,749,000112,910,0002,469,888
5Jun 16, 2025 16:53346,6731,726,910,7901,585,787,000112,913,0002,281,472
6Jun 16, 2025 16:53346,7811,726,137,6471,588,278,000110,949,0002,281,472
7Jun 16, 2025 16:53348,3431,739,979,6801,589,957,000116,923,0002,478,080
8Jun 16, 2025 16:53349,3811,733,254,7901,595,040,000116,929,0002,260,992
9Jun 16, 2025 16:53349,9341,738,048,5651,602,698,000111,978,0002,482,176