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:26zielajzielajScore: 29,767Success
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:2629,642164,954,588145,248,00002,318,336
2Jul 19, 2025 18:2629,752169,562,175144,789,000998,0002,338,816
3Jul 19, 2025 18:2629,759169,223,512142,823,0002,996,0002,457,600
4Jul 19, 2025 18:2629,762177,610,848142,836,0002,996,0002,355,200
5Jul 19, 2025 18:2629,767168,838,418144,861,000999,0002,297,856
6Jul 19, 2025 18:2629,787170,953,609144,957,000999,0002,314,240
7Jul 19, 2025 18:2629,790173,836,154142,971,0002,999,0002,486,272
8Jul 19, 2025 18:2629,873172,109,688145,375,0001,002,0002,322,432
9Jul 19, 2025 18:2630,297173,222,922148,457,00002,461,696