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 15, 2024 05:37matsuoka-601matsuoka-601Score: 56,513Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Jun 15, 2024 05:3752,342329,749,789256,475,71202,240,512
2Jun 15, 2024 05:3752,372317,574,297256,621,92902,371,584
3Jun 15, 2024 05:3752,845325,321,349258,938,09602,248,704
4Jun 15, 2024 05:3756,500303,571,116273,852,0002,998,0002,289,664
5Jun 15, 2024 05:3756,501306,569,009274,858,0001,998,0002,490,368
6Jun 15, 2024 05:3756,501298,163,665275,858,000999,0002,277,376
7Jun 15, 2024 05:3756,513300,005,662273,917,0002,999,0002,486,272
8Jun 15, 2024 05:3756,518297,800,287273,941,0002,999,0002,277,376
9Jun 15, 2024 05:3756,534309,998,818276,017,0001,000,0002,494,464
10Jun 15, 2024 05:3757,484309,041,982279,675,0001,997,0002,277,376
11Jun 15, 2024 05:3757,886309,665,345280,644,0002,996,0002,285,568
12Jun 15, 2024 05:3759,147312,598,085286,823,0002,998,0002,281,472