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 15:08Kevin HeaveyKevin HeaveyScore: 64,894Success
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:3664,802327,679,781315,862,0001,671,00020,480
2Jul 27, 2026 15:3664,810328,344,704315,896,0001,676,00020,480
3Jul 27, 2026 15:3664,851327,837,690316,116,0001,656,00020,480
4Jul 27, 2026 15:3664,873327,784,975316,100,0001,780,00020,480
5Jul 27, 2026 15:3664,894327,979,570316,319,0001,666,00020,480
6Jul 27, 2026 15:3664,920328,039,204316,454,0001,654,0002,113,536
7Jul 27, 2026 15:3664,926328,257,260316,353,0001,788,00020,480
8Jul 27, 2026 15:3664,951328,368,072316,574,0001,687,00020,480
9Jul 27, 2026 15:3665,224329,646,478317,957,0001,642,0002,113,536