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 15, 2025 01:23zielajzielajScore: 41,105Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 15, 2025 01:2340,432232,691,170197,115,0001,000,0002,301,952
2Jul 15, 2025 01:2340,437221,778,117197,140,0001,000,0002,449,408
3Jul 15, 2025 01:2340,441225,825,407198,162,00002,334,720
4Jul 15, 2025 01:2340,455222,977,893198,230,00002,445,312
5Jul 15, 2025 01:2341,105231,187,348200,413,0001,002,0002,314,240
6Jul 15, 2025 01:2341,141226,632,144201,589,00002,318,336
7Jul 15, 2025 01:2341,141225,295,427197,601,0003,991,0002,293,760
8Jul 15, 2025 01:2341,220230,108,765200,980,000999,0002,318,336
9Jul 15, 2025 01:2342,519233,161,336205,338,0003,004,0002,314,240