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 06:56matsuoka-601matsuoka-601Score: 63,201Success
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 06:5662,654340,874,076300,006,0007,000,0002,318,336
2Jun 12, 2024 06:5662,780339,608,678303,625,0003,995,0002,494,464
3Jun 12, 2024 06:5662,804329,293,937299,745,0007,993,0002,473,984
4Jun 12, 2024 06:5662,917335,989,325303,290,0005,004,0002,486,272
5Jun 12, 2024 06:5663,003328,973,071305,718,0002,997,0002,473,984
6Jun 12, 2024 06:5663,122331,591,837304,292,0005,004,0002,473,984
7Jun 12, 2024 06:5663,201334,758,836304,691,0004,994,0002,519,040
8Jun 12, 2024 06:5663,350338,230,717305,407,0005,006,0002,478,080
9Jun 12, 2024 06:5663,564381,770,276311,465,76502,260,992
10Jun 12, 2024 06:5663,587386,603,802311,574,49002,387,968
11Jun 12, 2024 06:5664,111371,686,876314,143,38902,265,088
12Jun 12, 2024 06:5666,873353,269,491320,686,0006,993,0002,478,080