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:17Павел РатмановПавел РатмановScore: 348,788Success
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:17347,3331,731,058,7151,578,009,000123,922,0002,277,376
2Jun 16, 2025 15:17347,8631,738,038,1461,588,629,000115,899,0002,371,584
3Jun 16, 2025 15:17348,1181,729,185,6771,590,861,000114,917,0002,285,568
4Jun 16, 2025 15:17348,2561,739,738,2541,598,488,000107,965,0002,306,048
5Jun 16, 2025 15:17348,7881,733,135,8651,590,127,000118,934,0002,465,792
6Jun 16, 2025 15:17348,9541,732,936,9141,597,950,000111,926,0002,392,064
7Jun 16, 2025 15:17349,1751,734,620,2661,593,031,000117,928,0002,285,568
8Jun 16, 2025 15:17349,5241,742,703,0061,603,751,000108,915,0002,465,792
9Jun 16, 2025 15:17349,6211,739,669,5341,596,200,000116,941,0002,285,568