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:16Павел РатмановПавел РатмановScore: 355,751Success
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:16354,5091,760,550,7161,628,150,000108,943,0002,273,280
2Jun 16, 2025 15:16355,4321,772,657,6231,627,707,000113,909,0002,277,376
3Jun 16, 2025 15:16355,6251,768,244,3931,624,659,000117,902,0002,465,792
4Jun 16, 2025 15:16355,6931,766,624,8581,624,973,000117,925,0002,433,024
5Jun 16, 2025 15:16355,7511,777,150,1061,635,230,000107,949,0002,449,408
6Jun 16, 2025 15:16355,7811,770,878,3521,631,434,000111,892,0002,465,792
7Jun 16, 2025 15:16356,0721,771,794,9551,633,835,000110,920,0002,457,600
8Jun 16, 2025 15:16356,5371,773,657,8081,653,083,00093,947,0002,318,336
9Jun 16, 2025 15:16356,7191,773,206,2171,630,996,000116,928,0002,277,376