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 11:58Kevin HeaveyKevin HeaveyScore: 75,600Success
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:0275,077377,699,095358,426,0009,454,00020,480
2Jul 27, 2026 12:0275,090377,747,099358,712,0009,231,0002,113,536
3Jul 27, 2026 12:0275,356379,119,801358,525,00010,723,00020,480
4Jul 27, 2026 12:0275,508381,399,901359,124,00010,866,00020,480
5Jul 27, 2026 12:0275,600380,268,329359,101,00011,339,0002,113,536
6Jul 27, 2026 12:0275,986382,329,328359,432,00012,902,00020,480
7Jul 27, 2026 12:0276,031382,391,994359,528,00013,027,00020,480
8Jul 27, 2026 12:0276,683385,649,676360,053,00015,695,00020,480
9Jul 27, 2026 12:0276,971387,047,597366,034,00011,128,0002,113,536