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 listSep 22, 2022 17:51Bernard TeoBernard TeoScore: 71,206Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 30, 2022 03:2468,281395,130,848334,575,00102,273,280
2Sep 22, 2022 17:5168,285394,640,267334,595,60402,269,184
3Sep 30, 2022 03:2468,359411,633,466334,961,34702,273,280
4Sep 22, 2022 17:4968,370404,483,843335,014,09202,269,184
5Sep 22, 2022 17:4968,374417,475,985335,033,36602,265,088
6Sep 22, 2022 17:5168,385405,054,911335,085,58902,273,280
7Sep 30, 2022 03:2468,400412,952,012335,158,22902,260,992
8Sep 22, 2022 17:4968,419405,524,537335,255,25902,273,280
9Sep 22, 2022 17:5171,137378,945,045346,574,0001,997,0002,404,352
10Sep 22, 2022 17:4971,173370,670,954347,749,000999,0002,281,472
11Sep 22, 2022 17:4971,184373,527,773346,805,0001,998,0002,519,040
12Sep 22, 2022 17:5171,187371,410,131346,820,0001,998,0002,396,160
13Sep 22, 2022 17:4971,193373,179,252346,847,0001,999,0002,404,352
14Sep 30, 2022 03:2471,193374,655,601347,845,000999,0002,281,472
15Sep 30, 2022 03:2471,196374,661,367347,861,000999,0002,396,160
16Sep 30, 2022 03:2471,196370,799,058348,861,00002,281,472
17Sep 30, 2022 03:2471,202370,370,629347,889,000999,0002,400,256
18Sep 22, 2022 17:4971,204371,113,453346,902,0001,999,0002,281,472
19Sep 22, 2022 17:5171,206374,111,305347,908,000999,0002,281,472
20Sep 30, 2022 03:2471,208371,071,964347,918,000999,0002,400,256
21Sep 22, 2022 17:4971,209373,707,780348,924,00002,281,472
22Sep 22, 2022 17:4971,212377,442,481347,939,000999,0002,281,472
23Sep 22, 2022 17:4971,212374,833,966347,938,000999,0002,281,472
24Sep 22, 2022 17:5171,235369,549,457347,051,0002,000,0002,404,352
25Sep 22, 2022 17:5171,242373,054,389347,084,0002,000,0002,400,256
26Sep 30, 2022 03:2471,243371,717,137347,093,0002,000,0002,281,472
27Sep 30, 2022 03:2471,250374,730,041347,127,0002,000,0002,281,472
28Sep 22, 2022 17:5171,279376,040,013349,268,00002,281,472
29Sep 30, 2022 03:2471,280379,117,480349,270,00002,400,256
30Sep 22, 2022 17:5171,292375,369,006348,333,0001,000,0002,281,472
31Sep 30, 2022 03:2471,299384,756,375349,363,00002,281,472
32Sep 22, 2022 17:4971,300377,330,352348,368,0001,001,0002,281,472
33Sep 22, 2022 17:4971,306377,988,399348,399,0001,001,0002,281,472
34Sep 22, 2022 17:5171,317375,792,597348,453,0001,001,0002,281,472
35Sep 22, 2022 17:5171,348376,968,479348,608,000998,0002,281,472
36Sep 22, 2022 17:5172,958435,745,078357,491,95102,260,992