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 17, 2025 16:18Павел РатмановПавел РатмановScore: 332,755Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 17, 2025 16:18332,7041,656,906,7961,629,253,000999,0002,273,280
2Jun 17, 2025 16:18332,7051,661,633,2251,630,253,00002,273,280
3Jun 17, 2025 16:18332,7291,661,296,9971,629,374,000999,0002,273,280
4Jun 17, 2025 16:18332,7431,660,949,4171,629,442,000999,0002,273,280
5Jun 17, 2025 16:18332,7551,657,579,0351,629,501,000999,0002,510,848
6Jun 17, 2025 16:18332,7641,655,307,9091,630,543,00002,400,256
7Jun 17, 2025 16:18332,7901,658,024,1241,628,671,0001,998,0002,396,160
8Jun 17, 2025 16:18332,7961,660,354,5871,629,702,000999,0002,400,256
9Jun 17, 2025 16:18332,8031,659,067,6421,630,736,00002,273,280