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 20, 2025 19:15zielajzielajScore: 29,572Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 20, 2025 19:1529,543166,286,219142,764,0001,996,0002,535,424
2Jul 20, 2025 19:1529,550166,688,953143,796,000998,0002,322,432
3Jul 20, 2025 19:1529,568165,235,578142,884,0001,998,0002,322,432
4Jul 20, 2025 19:1529,569165,286,528143,891,000999,0002,338,816
5Jul 20, 2025 19:1529,572172,709,281141,906,0002,998,0002,334,720
6Jul 20, 2025 19:1529,579168,051,223142,939,0001,999,0002,301,952
7Jul 20, 2025 19:1529,613168,954,982143,104,0002,001,0002,301,952
8Jul 20, 2025 19:1530,918177,028,833151,498,00002,306,048
9Jul 20, 2025 19:1531,001178,776,226150,907,000999,0002,449,408