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 listDec 20, 2025 10:23AnSaAnSaScore: 247,923Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Dec 20, 2025 10:23246,7841,239,864,4101,206,242,0002,998,0002,531,328
2Dec 20, 2025 10:23247,0931,232,109,1771,207,757,0002,999,0002,396,160
3Dec 20, 2025 10:23247,5661,244,042,0311,211,073,0002,000,0002,289,664
4Dec 20, 2025 10:23247,6891,240,510,0751,210,676,0002,999,0002,277,376
5Dec 20, 2025 10:23247,9231,235,966,1681,211,822,0002,999,0002,527,232
6Dec 20, 2025 10:23251,3511,262,290,6031,228,621,0002,999,0002,527,232
7Dec 20, 2025 10:23252,7081,274,249,4581,235,270,0002,998,0002,277,376
8Dec 20, 2025 10:23252,8971,264,730,8241,237,195,0001,998,0002,527,232
9Dec 20, 2025 10:23254,5971,274,655,2891,245,524,0001,999,0002,289,664