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 11, 2026 18:09Victor MerckléVictor MerckléScore: 63,050Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 11, 2026 18:1062,840317,048,808305,694,0002,225,0002,113,536
2May 11, 2026 18:1062,857318,258,268305,878,0002,124,0002,113,536
3May 11, 2026 18:1062,951318,057,647306,305,0002,157,0002,113,536
4May 11, 2026 18:1063,023317,574,763306,683,0002,132,0002,113,536
5May 11, 2026 18:1063,050331,094,225306,907,0002,040,0002,113,536
6May 11, 2026 18:1063,076318,166,399306,911,0002,162,0002,113,536
7May 11, 2026 18:1063,596322,155,477309,438,0002,186,0002,113,536
8May 11, 2026 18:1063,963323,964,452311,266,0002,154,0002,113,536
9May 11, 2026 18:1064,039324,168,237311,544,0002,248,0002,113,536