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 07:12NoSIMD_C#NoSIMD_C#Score: 559,033Success
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 07:12558,9312,764,929,1932,736,762,0001,999,0002,269,184
2Apr 8, 2025 07:12559,0012,769,657,3592,737,106,0001,998,0002,281,472
3Apr 8, 2025 07:12559,0192,765,329,2702,737,195,0001,998,0002,277,376
4Apr 8, 2025 07:12559,0242,769,469,2982,737,222,0001,998,0002,277,376
5Apr 8, 2025 07:12559,0332,762,984,8852,735,267,0003,997,0002,277,376
6Apr 8, 2025 07:12559,8642,770,246,6312,741,338,0001,998,0002,281,472
7Apr 8, 2025 07:12560,4352,776,028,6392,741,134,0004,996,0002,277,376
8Apr 8, 2025 07:12560,5252,770,447,2422,745,574,000999,0002,531,328
9Apr 8, 2025 07:12560,6302,771,542,7312,745,091,0001,998,0002,277,376