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 listJul 27, 2026 14:30Kevin HeaveyKevin HeaveyError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 27, 2026 15:180326,999,134304,034,00012,829,00020,480expected "560377360088 ", got "206277067730648 "
2Jul 27, 2026 15:180333,913,024312,455,00010,642,00020,480expected "560380598232 ", got "206287400490968 "
3Jul 27, 2026 15:180323,324,509304,215,0008,955,00020,480expected "560378310358 ", got "204093720325846 "