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 1, 2026 12:09Victor MerckléVictor MerckléScore: 50,575Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 1, 2026 12:1050,378254,771,191244,700,0002,155,0002,117,632stderr
2Jul 1, 2026 12:1050,403254,881,329244,959,0002,018,0002,117,632stderr
3Jul 1, 2026 12:1050,405254,998,664244,975,0002,011,0002,117,632stderr
4Jul 1, 2026 12:1050,571257,030,252245,606,0002,195,0002,117,632stderr
5Jul 1, 2026 12:1050,575255,725,160245,816,0002,006,0002,117,632stderr
6Jul 1, 2026 12:1050,588256,283,135245,852,0002,033,0002,117,632stderr
7Jul 1, 2026 12:1050,924257,387,480247,506,0002,022,0002,117,632stderr
8Jul 1, 2026 12:1051,188259,220,574248,806,0002,017,0002,117,632stderr
9Jul 1, 2026 12:1051,192258,988,522248,837,0002,007,0002,117,632stderr