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 listMar 15, 2026 16:07Pavel SkripkinPavel SkripkinScore: 510,044Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Mar 15, 2026 16:07509,9382,525,751,2102,497,695,000999,0002,437,120
2Mar 15, 2026 16:07509,9602,521,796,9282,498,806,00002,273,280
3Mar 15, 2026 16:07509,9642,522,810,8972,496,825,0001,999,0002,277,376
4Mar 15, 2026 16:07509,9682,517,689,4872,496,842,0001,999,0002,273,280
5Mar 15, 2026 16:07510,0442,527,345,0162,498,218,000999,0002,277,376
6Mar 15, 2026 16:07510,0562,529,069,9272,497,276,0001,998,0002,277,376
7Mar 15, 2026 16:07510,1762,531,019,6892,497,863,0001,999,0002,433,024
8Mar 15, 2026 16:07510,1892,524,848,5742,497,928,0001,999,0002,433,024
9Mar 15, 2026 16:07510,2022,526,170,7142,498,992,000999,0002,277,376