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 listJul 19, 2025 18:14zielajzielajScore: 31,180Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 19, 2025 18:1430,034176,138,335145,166,0002,002,0002,293,760
2Jul 19, 2025 18:1430,077168,092,406146,375,0001,002,0002,469,888
3Jul 19, 2025 18:1430,136173,829,851145,669,0001,995,0002,519,040
4Jul 19, 2025 18:1430,140175,129,564146,688,000997,0002,310,144
5Jul 19, 2025 18:1431,180175,489,897150,783,0001,997,0002,461,696
6Jul 19, 2025 18:1431,188179,254,291151,821,000998,0002,314,240
7Jul 19, 2025 18:1431,512180,687,502154,410,00002,449,408
8Jul 19, 2025 18:1431,559181,200,464151,647,0002,993,0002,318,336
9Jul 19, 2025 18:1431,799177,937,327154,819,000998,0002,322,432