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 listApr 6, 2025 12:36Aniruddha DebAniruddha DebScore: 474,627Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 6, 2025 12:36474,5922,350,734,5192,324,503,000999,0002,531,328
2Apr 6, 2025 12:36474,5962,348,298,2022,323,520,0001,998,0002,531,328
3Apr 6, 2025 12:36474,5972,349,886,5552,324,524,000999,0002,269,184
4Apr 6, 2025 12:36474,6212,349,904,4102,324,642,000999,0002,420,736
5Apr 6, 2025 12:36474,6272,356,293,7332,324,672,000999,0002,416,640
6Apr 6, 2025 12:36474,6322,351,317,7622,324,699,000999,0002,412,544
7Apr 6, 2025 12:36474,6582,348,294,1322,324,827,000999,0002,269,184
8Apr 6, 2025 12:36474,7392,355,550,9602,326,220,00002,269,184
9Apr 6, 2025 12:36474,8112,351,293,8842,324,577,0001,998,0002,269,184