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 13, 2025 09:28Павел РатмановПавел РатмановScore: 1,082,555Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 13, 2025 09:281,080,5405,321,111,0875,174,723,000119,924,0002,420,736
2Jun 13, 2025 09:281,081,2325,329,353,9675,184,099,000113,936,0002,461,696
3Jun 13, 2025 09:281,081,7865,331,039,6455,185,823,000114,929,0002,277,376
4Jun 13, 2025 09:281,082,2155,329,281,9775,190,920,000111,933,0002,273,280
5Jun 13, 2025 09:281,082,5555,334,556,6025,191,594,000112,925,0002,277,376
6Jun 13, 2025 09:281,083,1795,335,662,3795,192,653,000114,925,0002,277,376
7Jun 13, 2025 09:281,083,3875,340,067,8545,190,671,000117,924,0002,453,504
8Jun 13, 2025 09:281,083,5805,336,211,9065,194,617,000114,925,0002,465,792
9Jun 13, 2025 09:281,083,8815,346,637,3975,195,083,000115,934,0002,494,464