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 13, 2025 00:28zielajzielajScore: 44,851Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 13, 2025 00:2844,668244,755,793217,875,000999,0002,449,408
2Jul 13, 2025 00:2844,687242,535,871216,968,0001,999,0002,293,760
3Jul 13, 2025 00:2844,689240,920,450216,975,0001,999,0002,334,720
4Jul 13, 2025 00:2844,700240,633,717218,031,0001,000,0002,310,144
5Jul 13, 2025 00:2844,851245,663,953217,771,0001,997,0002,461,696
6Jul 13, 2025 00:2845,007247,763,381218,539,0001,995,0002,314,240
7Jul 13, 2025 00:2845,025248,633,850219,623,000998,0002,322,432
8Jul 13, 2025 00:2845,028241,208,205219,638,000998,0002,310,144
9Jul 13, 2025 00:2845,062240,828,764217,805,0002,997,0002,297,856