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 19, 2025 21:49Daniel NeumannDaniel NeumannScore: 549,343Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 19, 2025 21:49549,3142,718,283,2082,688,639,0002,998,0002,285,568
2Jun 19, 2025 21:49549,3182,718,378,9212,688,662,0002,998,0002,285,568
3Jun 19, 2025 21:49549,3312,719,007,1082,688,723,0002,998,0002,265,088
4Jun 19, 2025 21:49549,3332,721,021,1712,688,734,0002,998,0002,285,568
5Jun 19, 2025 21:49549,3432,719,558,9222,690,784,000999,0002,277,376
6Jun 19, 2025 21:49549,3792,720,170,0412,689,956,0001,999,0002,277,376
7Jun 19, 2025 21:49549,3962,722,670,2022,690,044,0001,998,0002,519,040
8Jun 19, 2025 21:49549,3972,719,103,1132,690,044,0001,999,0002,285,568
9Jun 19, 2025 21:49549,4342,717,568,5812,689,231,0002,998,0002,277,376