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 28, 2026 10:33Kevin HeaveyKevin HeaveyScore: 52,462Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 28, 2026 10:3551,701263,377,200230,586,00022,749,00020,480
2Jul 28, 2026 10:3551,806263,919,255229,678,00024,174,0002,113,536
3Jul 28, 2026 10:3552,369267,394,178229,646,00026,963,0002,113,536
4Jul 28, 2026 10:3552,390267,496,716229,824,00026,888,00020,480
5Jul 28, 2026 10:3552,462267,143,765229,773,00027,294,0002,113,536
6Jul 28, 2026 10:3553,087270,880,167229,683,00030,447,00020,480
7Jul 28, 2026 10:3553,088270,196,042230,180,00029,956,00020,480
8Jul 28, 2026 10:3553,148270,459,369229,525,00030,903,00020,480
9Jul 28, 2026 10:3553,271271,857,498229,779,00031,252,00020,480