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 12, 2024 13:43matsuoka-601matsuoka-601Score: 59,110Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 12, 2024 13:4359,005319,231,128286,123,0003,001,0002,293,760
2Jun 12, 2024 13:4359,008316,525,132286,140,0003,001,0002,293,760
3Jun 12, 2024 13:4359,012311,944,092286,159,0003,001,0002,293,760
4Jun 12, 2024 13:4359,024313,232,138287,218,0002,001,0002,293,760
5Jun 12, 2024 13:4359,042314,539,156286,301,0003,003,0002,412,544
6Jun 12, 2024 13:4359,048314,580,568287,334,0002,002,0002,424,832
7Jun 12, 2024 13:4359,110315,079,359286,645,0002,996,0002,416,640
8Jun 12, 2024 13:4359,422315,425,570288,165,0003,001,0002,293,760
9Jun 12, 2024 13:4359,604313,580,749289,062,0003,000,0002,293,760
10Jun 12, 2024 13:4360,735360,174,730297,599,73202,281,472
11Jun 12, 2024 13:4361,260360,297,524300,173,72802,277,376
12Jun 12, 2024 13:4361,400380,087,804300,861,79602,285,568