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:07Павел РатмановПавел РатмановScore: 1,080,880Success
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:071,079,6175,322,060,5515,178,185,000111,939,0002,285,568
2Jun 16, 2025 15:071,079,9455,320,463,0585,183,797,000107,933,0002,469,888
3Jun 16, 2025 15:071,080,3495,324,347,6425,176,783,000116,927,0002,273,280
4Jun 16, 2025 15:071,080,7375,328,621,0965,178,684,000116,925,0002,273,280
5Jun 16, 2025 15:071,080,8805,325,885,9075,181,393,000114,920,0002,465,792
6Jun 16, 2025 15:071,081,0365,330,021,4995,184,161,000112,916,0002,277,376
7Jun 16, 2025 15:071,081,3245,330,197,3925,184,566,000113,924,0002,277,376
8Jun 16, 2025 15:071,082,0915,330,439,6765,184,328,000117,916,0002,277,376
9Jun 16, 2025 15:071,083,9585,342,780,4295,196,473,000114,922,0002,273,280