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 listSep 24, 2026 13:40Andrew EpsteinAndrew EpsteinScore: 273,274Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 24, 2026 13:40273,2451,349,941,7861,337,904,0001,001,0002,117,632stderr
2Sep 24, 2026 13:40273,2471,349,229,2051,337,912,0001,002,0002,117,632stderr
3Sep 24, 2026 13:40273,2481,349,310,9111,337,916,0001,003,0002,117,632stderr
4Sep 24, 2026 13:40273,2681,350,139,1141,338,004,0001,010,0002,117,632stderr
5Sep 24, 2026 13:40273,2741,349,871,5381,338,017,0001,028,0002,117,632stderr
6Sep 24, 2026 13:40273,3491,350,450,6971,338,406,0001,006,0002,117,632stderr
7Sep 24, 2026 13:40274,7601,357,296,3811,345,321,0001,004,0002,117,632stderr
8Sep 24, 2026 13:40274,7881,357,497,0531,345,457,0001,005,0002,117,632stderr
9Sep 24, 2026 13:40277,2171,368,766,4901,357,362,0001,006,0002,117,632stderr