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:52matsuoka-601matsuoka-601Score: 59,826Success
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:5259,496361,931,487291,531,64802,277,376
2Jun 12, 2024 13:5259,500368,654,532291,550,66902,289,664
3Jun 12, 2024 13:5259,533357,349,791291,713,99202,273,280
4Jun 12, 2024 13:5259,806322,989,721290,049,0003,000,0002,293,760
5Jun 12, 2024 13:5259,819317,857,667290,113,0003,001,0002,293,760
6Jun 12, 2024 13:5259,820319,127,690290,117,0003,001,0002,293,760
7Jun 12, 2024 13:5259,826316,922,382290,146,0003,001,0002,293,760
8Jun 12, 2024 13:5259,828315,436,210290,154,0003,001,0002,293,760
9Jun 12, 2024 13:5260,166323,217,850291,815,0002,998,0002,293,760
10Jun 12, 2024 13:5260,311326,066,513293,523,0002,003,0002,412,544
11Jun 12, 2024 13:5262,236332,430,404302,959,0001,999,0002,416,640
12Jun 12, 2024 13:5262,543334,438,972304,458,0002,003,0002,293,760