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 listMay 12, 2026 20:08Victor MerckléVictor MerckléScore: 154,411Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 12, 2026 20:14154,381767,894,241754,453,0002,018,0002,113,536
2May 12, 2026 20:14154,395766,944,055754,512,0002,027,0002,113,536
3May 12, 2026 20:14154,398766,921,081754,553,0002,001,0002,113,536
4May 12, 2026 20:14154,406767,750,192754,421,0002,172,0002,113,536
5May 12, 2026 20:14154,411768,021,376754,522,0002,092,0002,113,536
6May 12, 2026 20:14154,415765,585,764754,445,0002,191,0002,113,536
7May 12, 2026 20:14154,418765,278,550755,647,0001,003,0002,113,536
8May 12, 2026 20:14154,422767,403,535754,632,0002,039,0002,113,536
9May 12, 2026 20:14154,428767,948,314754,594,0002,106,0002,113,536