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:53matsuoka-601matsuoka-601Score: 56,495Success
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:5352,209319,532,727255,826,21902,248,704
2Jun 15, 2024 05:5352,220325,472,731255,879,96802,244,608
3Jun 15, 2024 05:5452,225319,558,261255,903,67202,240,512
4Jun 15, 2024 05:5352,342323,322,569256,473,72802,244,608
5Jun 15, 2024 05:5452,342320,111,387256,474,46302,244,608
6Jun 15, 2024 05:5352,392318,039,720256,721,59202,240,512
7Jun 15, 2024 05:5352,659323,001,241258,031,08402,367,488
8Jun 15, 2024 05:5352,941331,945,102259,410,07702,236,416
9Jun 15, 2024 05:5453,564327,178,353262,464,82402,244,608
10Jun 15, 2024 05:5456,472302,210,826273,716,0002,996,0002,502,656
11Jun 15, 2024 05:5356,472298,594,567273,715,0002,996,0002,506,752
12Jun 15, 2024 05:5356,476303,361,206273,737,0002,997,0002,277,376
13Jun 15, 2024 05:5356,482301,884,026273,765,0002,997,0002,277,376
14Jun 15, 2024 05:5356,482299,349,019274,762,0001,998,0002,502,656
15Jun 15, 2024 05:5356,489303,300,768273,798,0002,997,0002,281,472
16Jun 15, 2024 05:5356,489305,493,386273,798,0002,997,0002,334,720
17Jun 15, 2024 05:5456,489304,595,171273,801,0002,997,0002,502,656
18Jun 15, 2024 05:5356,491298,940,113273,811,0002,997,0002,289,664
19Jun 15, 2024 05:5356,495304,143,156273,828,0002,998,0002,281,472
20Jun 15, 2024 05:5456,498299,527,335272,845,0003,997,0002,519,040
21Jun 15, 2024 05:5356,499303,593,800273,847,0002,998,0002,498,560
22Jun 15, 2024 05:5456,499306,125,864274,847,0001,998,0002,289,664
23Jun 15, 2024 05:5356,500305,727,932273,851,0002,998,0002,498,560
24Jun 15, 2024 05:5456,500301,453,453273,854,0002,998,0002,289,664
25Jun 15, 2024 05:5456,504298,650,291274,870,0001,999,0002,293,760
26Jun 15, 2024 05:5356,511305,731,117273,908,0002,998,0002,285,568
27Jun 15, 2024 05:5356,513304,518,848274,915,0001,999,0002,289,664
28Jun 15, 2024 05:5356,515306,333,769273,926,0002,999,0002,289,664
29Jun 15, 2024 05:5356,518307,358,414273,939,0002,999,0002,490,368
30Jun 15, 2024 05:5356,694303,721,462275,802,0001,998,0002,502,656
31Jun 15, 2024 05:5457,130303,239,399277,940,0001,999,0002,494,464
32Jun 15, 2024 05:5357,146303,672,188278,017,0002,000,0002,502,656
33Jun 15, 2024 05:5457,231309,708,902278,427,0002,003,0002,502,656
34Jun 15, 2024 05:5458,524309,486,047283,771,0002,997,0002,281,472
35Jun 15, 2024 05:5358,556313,557,434283,926,0002,999,0002,281,472
36Jun 15, 2024 05:5358,565311,805,925283,970,0002,999,0002,281,472