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 listJun 16, 2025 15:10Павел РатмановПавел РатмановScore: 355,546Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 16, 2025 15:10355,0651,763,837,9221,624,897,000114,922,0002,277,376
2Jun 16, 2025 15:10355,1061,765,010,7591,626,086,000113,935,0002,465,792
3Jun 16, 2025 15:10355,2731,768,166,8551,620,920,000119,920,0002,453,504
4Jun 16, 2025 15:10355,3851,764,641,7801,632,427,000108,961,0002,457,600
5Jun 16, 2025 15:10355,5461,765,966,3441,634,228,000107,949,0002,285,568
6Jun 16, 2025 15:10355,8061,770,682,7161,633,485,000109,965,0002,469,888
7Jun 16, 2025 15:10355,8921,769,824,2071,636,939,000106,930,0002,277,376
8Jun 16, 2025 15:10356,0341,764,474,8481,630,662,000113,906,0002,457,600
9Jun 16, 2025 15:10356,0521,767,326,7641,633,739,000110,914,0002,285,568