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 19, 2025 02:12zielajzielajScore: 32,743Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jul 19, 2025 02:0632,712180,410,946159,289,0001,001,0002,322,432
2Jul 19, 2025 02:0632,716192,760,719160,307,00002,453,504
3Jul 19, 2025 02:0632,721183,979,152159,330,0001,002,0002,314,240
4Jul 19, 2025 02:0632,731182,885,213159,382,0001,002,0002,310,144
5Jul 19, 2025 02:0632,734184,149,530158,394,0002,004,0002,457,600
6Jul 19, 2025 02:1232,740187,808,810158,419,0002,005,0002,465,792
7Jul 19, 2025 02:1232,743186,690,967158,438,0002,005,0002,445,312
8Jul 19, 2025 02:1232,743188,808,933158,438,0002,005,0002,285,568
9Jul 19, 2025 02:0632,745184,513,047160,451,00002,306,048
10Jul 19, 2025 02:0632,755188,402,927160,498,00002,306,048
11Jul 19, 2025 02:0633,156186,579,144162,464,00002,322,432
12Jul 19, 2025 02:0633,162184,924,064162,493,00002,535,424