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 20, 2025 15:39Daniel NeumannDaniel NeumannScore: 456,123Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 20, 2025 15:39455,1842,252,593,6212,228,405,0001,999,0002,285,568
2Jun 20, 2025 15:39455,2312,257,625,3012,227,636,0002,998,0002,285,568
3Jun 20, 2025 15:39455,2372,256,284,0912,228,663,0001,998,0002,519,040
4Jun 20, 2025 15:39456,1192,258,003,5302,231,987,0002,998,0002,277,376
5Jun 20, 2025 15:39456,1232,259,553,9632,233,003,0001,999,0002,273,280
6Jun 20, 2025 15:39456,3642,264,625,5362,234,183,0001,999,0002,285,568
7Jun 20, 2025 15:39456,3782,260,557,3802,233,256,0002,997,0002,285,568
8Jun 20, 2025 15:39456,4062,265,006,9052,233,392,0002,997,0002,277,376
9Jun 20, 2025 15:39478,6172,374,260,0502,342,224,0002,999,0002,273,280