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 6, 2026 19:05Victor MerckléVictor MerckléScore: 59,688Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 6, 2026 19:0559,442300,366,717289,258,0002,009,0002,113,536
2Jun 6, 2026 19:0559,495300,934,592289,440,0002,088,0002,113,536
3Jun 6, 2026 19:0559,616301,248,023290,093,0002,030,0002,113,536
4Jun 6, 2026 19:0559,656301,435,023290,185,0002,134,0002,113,536
5Jun 6, 2026 19:0559,688301,643,978290,416,0002,060,0002,113,536
6Jun 6, 2026 19:0559,784302,091,854290,679,0002,265,0002,113,536
7Jun 6, 2026 19:0559,832302,396,616291,149,0002,028,0002,113,536
8Jun 6, 2026 19:0560,153303,878,631292,521,0002,229,0002,113,536
9Jun 6, 2026 19:0561,468310,376,539299,034,0002,160,0002,113,536