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 22, 2025 16:31KeefeKeefeScore: 205,671Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Apr 22, 2025 16:29204,7801,027,307,7981,001,424,0001,998,0002,330,624
2Apr 22, 2025 16:29204,8421,028,887,8351,002,726,000999,0002,269,184
3Apr 22, 2025 16:29205,0451,035,503,0511,003,721,000999,0002,269,184
4Apr 22, 2025 16:29205,0501,029,955,4721,002,744,0001,999,0002,269,184
5Apr 22, 2025 16:29205,1171,028,189,7261,002,076,0002,997,0002,269,184
6Apr 22, 2025 16:31205,4361,032,462,7431,002,637,0003,998,0002,269,184
7Apr 22, 2025 16:29205,6711,035,273,6051,004,791,0002,999,0002,445,312
8Apr 22, 2025 16:31205,8971,036,668,2481,006,895,0001,999,0002,322,432
9Apr 22, 2025 16:29207,7711,053,557,5811,017,079,000999,0002,269,184
10Apr 22, 2025 16:29207,7871,040,721,7331,017,158,000999,0002,326,528
11Apr 22, 2025 16:31207,9321,045,983,4111,015,869,0002,999,0002,269,184
12Apr 22, 2025 16:29208,6981,052,666,4541,022,622,00002,269,184