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 5, 2026 21:44Victor MerckléVictor MerckléScore: 57,871Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 5, 2026 21:4457,830292,623,870281,275,0002,093,0002,113,536
2Jun 5, 2026 21:4457,842292,555,170281,326,0002,102,0002,113,536
3Jun 5, 2026 21:4457,846292,544,323281,401,0002,047,0002,113,536
4Jun 5, 2026 21:4457,847292,536,346281,387,0002,068,0002,113,536
5Jun 5, 2026 21:4457,871292,671,120281,482,0002,087,0002,113,536
6Jun 5, 2026 21:4457,909292,888,773281,614,0002,143,0002,113,536
7Jun 5, 2026 21:4457,915292,906,264281,708,0002,079,0002,113,536
8Jun 5, 2026 21:4458,666296,743,133285,418,0002,049,0002,113,536
9Jun 5, 2026 21:4458,706296,777,579285,494,0002,167,0002,113,536