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 12:10Kevin HeaveyKevin HeaveyScore: 58,072Success
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 12:2657,598296,555,301273,406,0008,827,00020,480
2Jul 27, 2026 12:2657,608292,384,601273,361,0008,922,00020,480
3Jul 27, 2026 12:2658,015294,258,769273,807,00010,468,00020,480
4Jul 27, 2026 12:2658,018294,262,428273,472,00010,818,00020,480
5Jul 27, 2026 12:2658,072294,536,635274,820,0009,737,0002,113,536
6Jul 27, 2026 12:2658,078294,606,194273,560,00011,027,0002,113,536
7Jul 27, 2026 12:2658,134294,948,552274,238,00010,623,00020,480
8Jul 27, 2026 12:2658,185295,559,822274,039,00011,072,00020,480
9Jul 27, 2026 12:2658,535297,174,823275,085,00011,738,0002,113,536