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 08:18matsuoka-601matsuoka-601Score: 61,306Success
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 08:1760,494326,432,221294,419,0002,002,0002,293,760
2Jun 12, 2024 08:1860,499324,295,557294,442,0002,003,0002,293,760
3Jun 12, 2024 08:1760,619319,727,424294,032,0003,000,0002,293,760
4Jun 12, 2024 08:1860,694319,820,554296,400,0001,001,0002,420,736
5Jun 12, 2024 08:1760,816320,452,524295,998,0001,999,0002,293,760
6Jun 12, 2024 08:1860,919327,365,743296,500,0002,003,0002,293,760
7Jun 12, 2024 08:1760,959320,430,058295,702,0002,996,0002,293,760
8Jun 12, 2024 08:1761,230330,988,534297,026,0003,000,0002,293,760
9Jun 12, 2024 08:1861,259373,701,673300,167,12902,260,992
10Jun 12, 2024 08:1861,266327,246,999297,200,0003,002,0002,293,760
11Jun 12, 2024 08:1861,271324,951,069299,226,0001,000,0002,293,760
12Jun 12, 2024 08:1861,273321,394,606298,235,0002,001,0002,293,760
13Jun 12, 2024 08:1861,306387,209,164300,399,58002,273,280
14Jun 12, 2024 08:1761,334376,554,547300,535,37002,289,664
15Jun 12, 2024 08:1861,380364,418,451300,759,83602,289,664
16Jun 12, 2024 08:1862,554332,699,285305,514,0001,001,0002,293,760
17Jun 12, 2024 08:1763,169370,439,346309,530,17502,277,376
18Jun 12, 2024 08:1763,348367,318,697310,406,73402,273,280
19Jun 12, 2024 08:1864,015339,373,928310,677,0002,996,0002,293,760
20Jun 12, 2024 08:1766,617351,822,483324,419,0002,002,0002,441,216
21Jun 12, 2024 08:1866,673352,812,223323,700,0002,997,0002,293,760
22Jun 12, 2024 08:1767,333354,715,161327,932,0001,999,0002,293,760
23Jun 12, 2024 08:1775,964393,767,206369,222,0003,001,0002,293,760
24Jun 12, 2024 08:1776,917403,984,837375,893,000999,0002,293,760