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 listNov 6, 2025 15:32izotoffizotoffScore: 2,364,928Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 6, 2025 15:322,363,33611,612,456,83711,416,453,000163,891,0002,412,544
2Nov 6, 2025 15:322,364,22211,614,974,37911,422,790,000161,897,0002,338,816
3Nov 6, 2025 15:322,364,44311,624,687,96611,412,848,000172,921,0002,338,816
4Nov 6, 2025 15:322,364,68611,615,900,95211,415,050,000171,910,0002,473,984
5Nov 6, 2025 15:322,364,92811,624,322,66711,429,253,000158,892,0002,338,816
6Nov 6, 2025 15:322,366,53311,633,736,29811,434,083,000161,930,0002,338,816
7Nov 6, 2025 15:322,366,67411,638,070,83611,438,817,000157,887,0002,437,120
8Nov 6, 2025 15:322,366,81511,635,358,28511,439,496,000157,896,0002,338,816
9Nov 6, 2025 15:322,395,06111,768,165,23911,578,908,000156,890,0002,387,968