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 14, 2024 06:20matsuoka-601matsuoka-601Score: 56,601Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 14, 2024 06:2055,345336,933,110271,192,26702,404,352
2Jun 14, 2024 06:2055,598343,047,949272,429,42102,273,280
3Jun 14, 2024 06:2055,978339,378,721274,293,70002,289,664
4Jun 14, 2024 06:2056,538300,296,712274,037,0003,000,0002,416,640
5Jun 14, 2024 06:2056,541298,418,423274,053,0003,000,0002,293,760
6Jun 14, 2024 06:2056,551299,831,464274,098,0003,001,0002,523,136
7Jun 14, 2024 06:2056,601303,289,829274,344,0003,003,0002,428,928
8Jun 14, 2024 06:2056,965304,875,595276,126,0003,001,0002,293,760
9Jun 14, 2024 06:2057,076307,035,764276,676,0002,996,0002,424,832
10Jun 14, 2024 06:2057,139304,532,334277,984,0001,999,0002,293,760
11Jun 14, 2024 06:2058,074314,485,595282,561,0002,003,0002,293,760
12Jun 14, 2024 06:2058,476311,566,847284,534,0001,996,0002,420,736