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 4, 2026 23:31Victor MerckléVictor MerckléScore: 70,718Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 4, 2026 23:3270,680355,838,576344,174,0002,160,0002,113,536
2Jun 4, 2026 23:3270,688355,494,271344,362,0002,013,0002,113,536
3Jun 4, 2026 23:3270,699355,542,126344,318,0002,109,0002,113,536
4Jun 4, 2026 23:3270,714355,595,977344,410,0002,091,0002,113,536
5Jun 4, 2026 23:3270,718355,725,990344,333,0002,189,0002,113,536
6Jun 4, 2026 23:3270,722356,130,274344,491,0002,051,0002,113,536
7Jun 4, 2026 23:3270,744355,766,419344,471,0002,176,0002,113,536
8Jun 4, 2026 23:3270,772355,867,732344,562,0002,221,0002,113,536
9Jun 4, 2026 23:3271,034357,134,886346,056,0002,011,0002,113,536