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 11, 2025 21:14Daniel NeumannDaniel NeumannScore: 1,610,891Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 11, 2025 21:141,608,9777,913,847,9607,753,054,000130,933,0002,281,472
2Jun 11, 2025 21:141,609,2497,914,289,0747,779,382,000105,937,0002,490,368
3Jun 11, 2025 21:141,609,6397,918,440,0457,775,299,000111,932,0002,281,472
4Jun 11, 2025 21:141,609,7147,918,460,3467,770,650,000116,949,0002,281,472
5Jun 11, 2025 21:141,610,8917,926,895,6037,783,432,000109,935,0002,473,984
6Jun 11, 2025 21:141,610,9567,929,352,9537,757,758,000135,925,0002,281,472
7Jun 11, 2025 21:141,614,9807,944,564,8627,772,469,000140,935,0002,281,472
8Jun 11, 2025 21:141,639,9238,071,508,5877,905,708,000129,913,0002,281,472
9Jun 11, 2025 21:141,916,5119,423,015,0429,282,963,000107,941,0002,351,104