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 listJun 29, 2025 15:17Aniruddha DebAniruddha DebScore: 358,311Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 29, 2025 15:17358,2731,786,698,5521,755,540,00002,269,184
2Jun 29, 2025 15:17358,2941,780,521,2261,755,643,00002,433,024
3Jun 29, 2025 15:17358,2971,779,054,9421,754,656,000999,0002,531,328
4Jun 29, 2025 15:17358,3071,783,163,5231,754,704,000999,0002,531,328
5Jun 29, 2025 15:17358,3111,786,962,7691,754,725,000999,0002,428,928
6Jun 29, 2025 15:17358,3181,779,745,3451,753,761,0001,998,0002,433,024
7Jun 29, 2025 15:17358,3191,777,460,7841,753,767,0001,998,0002,531,328
8Jun 29, 2025 15:17358,3501,781,782,7221,753,917,0001,998,0002,531,328
9Jun 29, 2025 15:17358,3901,783,212,9971,756,109,00002,531,328