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, 2024 12:05matsuoka-601matsuoka-601Score: 64,067Success
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, 2024 12:0563,698334,581,637288,109,00024,009,0002,371,584
2Jun 13, 2024 12:0563,704335,594,294288,139,00024,011,0002,490,368
3Jun 13, 2024 12:0563,736345,061,326291,288,00021,020,0002,506,752
4Jun 13, 2024 12:0563,745337,083,325292,330,00020,022,0002,371,584
5Jun 13, 2024 12:0563,842336,509,375293,835,00018,989,0002,486,272
6Jun 13, 2024 12:0563,953335,445,750292,344,00021,024,0002,371,584
7Jun 13, 2024 12:0564,067336,521,172295,931,00017,995,0002,490,368
8Jun 13, 2024 12:0564,103342,070,751297,102,00017,005,0002,367,488
9Jun 13, 2024 12:0564,237343,748,929290,778,00023,981,0002,367,488
10Jun 13, 2024 12:0564,365378,926,037315,387,86002,260,992
11Jun 13, 2024 12:0564,474388,431,699315,924,26102,260,992
12Jun 13, 2024 12:0564,562468,012,254316,352,92702,248,704