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 listDec 20, 2025 15:50AnSaAnSaScore: 228,274Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Dec 20, 2025 15:50226,7581,137,853,5661,109,112,0002,000,0002,514,944
2Dec 20, 2025 15:50227,8181,143,490,9951,113,311,0002,998,0002,289,664
3Dec 20, 2025 15:50228,0811,145,403,8701,115,599,0001,999,0002,289,664
4Dec 20, 2025 15:50228,1931,149,658,5921,116,147,0001,998,0002,277,376
5Dec 20, 2025 15:50228,2741,140,258,6531,117,545,000999,0002,289,664
6Dec 20, 2025 15:50228,6711,143,772,3031,117,488,0002,998,0002,387,968
7Dec 20, 2025 15:50230,1571,155,612,8361,124,771,0002,999,0002,527,232
8Dec 20, 2025 15:50232,9921,169,923,9981,139,664,0001,999,0002,289,664
9Dec 20, 2025 15:50233,9611,170,696,9641,143,411,0002,998,0002,359,296