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 listNov 5, 2025 13:55AntonAntonScore: 1,212,930Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 5, 2025 13:551,210,2975,968,235,0925,876,507,00053,949,0002,306,048
2Nov 5, 2025 13:551,211,4785,969,435,2735,872,306,00063,938,0002,494,464
3Nov 5, 2025 13:551,212,4605,975,065,1905,867,130,00073,926,0002,306,048
4Nov 5, 2025 13:551,212,5475,973,213,3885,885,534,00055,948,0002,494,464
5Nov 5, 2025 13:551,212,9305,978,237,8065,893,407,00049,952,0002,306,048
6Nov 5, 2025 13:551,216,3115,992,255,9235,902,971,00056,951,0002,433,024
7Nov 5, 2025 13:551,217,3016,003,157,2865,886,844,00077,931,0002,306,048
8Nov 5, 2025 13:551,221,6746,021,042,1825,932,256,00053,947,0002,306,048
9Nov 5, 2025 13:551,226,1516,040,721,8365,961,192,00046,946,0002,306,048