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 8, 2025 06:34NoSIMD_C#NoSIMD_C#Score: 560,487Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 8, 2025 06:34558,8712,764,126,2392,733,473,0004,997,0002,277,376
2Apr 8, 2025 06:34559,0622,766,174,7582,737,405,0001,998,0002,277,376
3Apr 8, 2025 06:34560,4242,770,285,2182,745,079,000999,0002,277,376
4Apr 8, 2025 06:34560,4492,771,873,5022,743,203,0002,998,0002,277,376
5Apr 8, 2025 06:34560,4872,775,781,5132,743,388,0002,998,0002,523,136
6Apr 8, 2025 06:34560,4922,769,778,5702,743,413,0002,998,0002,277,376
7Apr 8, 2025 06:34560,5002,772,692,4962,744,454,0001,998,0002,277,376
8Apr 8, 2025 06:34560,5662,774,378,0012,743,776,0002,998,0002,277,376
9Apr 8, 2025 06:34560,6012,776,433,2942,743,948,0002,997,0002,277,376