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 listOct 19, 2025 02:33Marco BarboneMarco BarboneScore: 1,094,182Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 19, 2025 02:331,093,3175,385,363,8165,357,252,00002,273,280
2Oct 19, 2025 02:331,093,5875,388,319,4415,358,575,00002,273,280
3Oct 19, 2025 02:331,093,9005,390,049,4415,359,113,000999,0002,273,280
4Oct 19, 2025 02:331,094,1065,391,753,2935,361,120,00002,273,280
5Oct 19, 2025 02:331,094,1825,392,392,2375,360,494,000999,0002,437,120
6Oct 19, 2025 02:331,094,3775,386,702,9495,360,449,0001,998,0002,273,280
7Oct 19, 2025 02:331,094,6115,396,082,2105,362,596,000999,0002,273,280
8Oct 19, 2025 02:331,094,7085,401,984,7785,363,068,000999,0002,273,280
9Oct 19, 2025 02:331,094,9515,387,061,5065,364,260,000999,0002,273,280