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 listJul 5, 2026 18:50Victor MerckléVictor MerckléScore: 42,043Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 5, 2026 18:5140,639206,990,763197,121,0002,011,00024,576stderr
2Jul 5, 2026 18:5141,544211,636,824200,531,0003,036,00024,576stderr
3Jul 5, 2026 18:5141,590211,617,986200,730,0003,063,00024,576stderr
4Jul 5, 2026 18:5141,706212,355,737202,349,0002,014,00024,576stderr
5Jul 5, 2026 18:5142,043213,819,370203,505,0002,510,00024,576stderr
6Jul 5, 2026 18:5142,683217,183,574206,091,0003,057,00024,576stderr
7Jul 5, 2026 18:5143,031218,636,282208,842,0002,012,00024,576stderr
8Jul 5, 2026 18:5143,060218,744,277207,787,0003,208,00024,576stderr
9Jul 5, 2026 18:5143,115219,053,045209,255,0002,013,00024,576stderr