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 15, 2025 20:47zielajzielajScore: 37,490Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 15, 2025 20:4737,476205,058,490181,636,0001,996,0002,469,888
2Jul 15, 2025 20:4737,477209,532,872181,642,0001,996,0002,469,888
3Jul 15, 2025 20:4737,485212,009,809181,681,0001,996,0002,322,432
4Jul 15, 2025 20:4737,486203,191,191182,681,000998,0002,465,792
5Jul 15, 2025 20:4737,490200,573,156182,705,000998,0002,318,336
6Jul 15, 2025 20:4737,492212,571,742182,715,000998,0002,330,624
7Jul 15, 2025 20:4737,748208,539,036183,965,000999,0002,441,216
8Jul 15, 2025 20:4738,464216,493,438187,472,0001,002,0002,318,336
9Jul 15, 2025 20:4738,466213,385,920188,484,00002,310,144