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 listOct 4, 2025 15:11AnSaAnSaScore: 296,408Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Oct 4, 2025 15:11296,3061,477,405,5751,450,899,000999,0002,285,568
2Oct 4, 2025 15:11296,3221,476,219,8261,449,980,0001,998,0002,285,568
3Oct 4, 2025 15:11296,3671,474,415,1561,451,201,000999,0002,273,280
4Oct 4, 2025 15:11296,3971,476,265,2701,449,347,0002,998,0002,277,376
5Oct 4, 2025 15:11296,4081,482,060,6261,450,401,0001,999,0002,285,568
6Oct 4, 2025 15:11296,4121,474,596,7971,450,418,0001,999,0002,285,568
7Oct 4, 2025 15:11296,4691,480,438,2291,450,698,0001,999,0002,519,040
8Oct 4, 2025 15:11296,4801,482,908,6111,449,753,0002,997,0002,285,568
9Oct 4, 2025 15:11296,5821,479,545,1371,450,253,0002,998,0002,277,376