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 7, 2026 10:25Victor MerckléVictor MerckléScore: 54,037Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 7, 2026 10:2653,885273,111,000261,813,0002,227,0002,113,536
2Jun 7, 2026 10:2654,001273,729,449262,403,0002,202,0002,113,536
3Jun 7, 2026 10:2654,013273,972,482262,446,0002,220,0002,113,536
4Jun 7, 2026 10:2654,014273,903,044262,444,0002,226,0002,113,536
5Jun 7, 2026 10:2654,037273,981,087262,528,0002,256,0002,113,536
6Jun 7, 2026 10:2654,044273,908,926262,612,0002,206,0002,113,536
7Jun 7, 2026 10:2654,056274,017,841262,864,0002,011,0002,113,536
8Jun 7, 2026 10:2654,091274,602,600262,829,0002,218,0002,113,536
9Jun 7, 2026 10:2654,567276,496,281265,157,0002,224,0002,113,536