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 listJul 20, 2022 13:58Yuriy LyfenkoYuriy LyfenkoScore: 96,991Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Dec 10, 2021 02:2096,885552,178,560474,734,59202,203,648
2Jul 20, 2022 13:5896,909550,569,461474,853,85802,207,744
3Dec 10, 2021 02:1696,921503,595,064473,913,000999,0002,347,008
4Dec 10, 2021 02:2096,924504,398,355473,931,000999,0002,260,992
5Dec 10, 2021 02:1696,925500,602,804472,935,0001,999,0002,265,088
6Dec 10, 2021 02:1696,929500,511,514472,953,0001,999,0002,334,720
7Jul 20, 2022 13:5896,931499,812,275473,965,000999,0002,265,088
8Dec 10, 2021 02:2096,935502,150,864472,982,0001,999,0002,527,232
9Dec 10, 2021 02:1696,937503,216,694473,994,000999,0002,338,816
10Dec 10, 2021 02:2196,939505,686,543474,003,0001,000,0002,265,088
11Dec 10, 2021 02:1696,943496,205,430474,022,0001,000,0002,265,088
12Dec 10, 2021 02:2196,944502,489,105475,027,00002,523,136
13Jul 20, 2022 15:1296,947503,078,775475,039,00002,347,008
14Dec 10, 2021 02:2096,950502,676,940475,056,00002,265,088
15Jul 20, 2022 13:5896,951555,156,558475,062,15402,203,648
16Dec 10, 2021 02:1696,966555,573,790475,131,83502,207,744
17Jul 20, 2022 15:1296,970502,296,021475,153,00002,265,088
18Dec 10, 2021 02:2196,970497,156,423474,155,0001,000,0002,351,104
19Dec 10, 2021 02:1696,971499,001,169474,156,0001,000,0002,265,088
20Dec 10, 2021 02:2196,974502,806,228475,175,00002,342,912
21Dec 10, 2021 02:2096,974498,614,055475,174,00002,342,912
22Dec 10, 2021 02:1696,975497,875,398475,177,00002,342,912
23Jul 20, 2022 13:5896,976551,714,613475,180,49702,203,648
24Jul 20, 2022 15:1296,978504,288,945475,190,00002,461,696
25Jul 20, 2022 15:1296,979502,119,547474,196,0001,000,0002,334,720
26Jul 20, 2022 15:1296,984498,400,236474,223,0001,000,0002,265,088
27Dec 10, 2021 02:2096,986498,381,077475,233,00002,347,008
28Dec 10, 2021 02:2096,987493,149,267474,236,0001,000,0002,338,816
29Dec 10, 2021 02:2196,988500,905,419474,241,0001,000,0002,265,088
30Dec 10, 2021 02:2196,990547,799,295475,250,04402,322,432
31Dec 10, 2021 02:2196,991536,700,705475,256,49802,211,840
32Jul 20, 2022 13:5896,992499,300,263474,259,0001,000,0002,342,912
33Jul 20, 2022 13:5896,994498,152,060474,271,0001,000,0002,265,088
34Dec 10, 2021 02:1696,995547,926,005475,274,86402,203,648
35Dec 10, 2021 02:1696,997497,834,453475,286,00002,338,816
36Jul 20, 2022 13:5896,997502,124,712474,286,0001,000,0002,265,088
37Jul 20, 2022 13:5897,000503,236,935474,303,000998,0002,342,912
38Dec 10, 2021 02:2197,001498,019,452474,304,0001,000,0002,461,696
39Jul 20, 2022 13:5897,006503,559,406475,330,00002,347,008
40Dec 10, 2021 02:2197,006501,106,622475,327,00002,342,912
41Jul 20, 2022 15:1297,008501,567,897474,339,0001,000,0002,265,088
42Dec 10, 2021 02:2197,016508,129,757473,382,0001,997,0002,527,232
43Jul 20, 2022 15:1297,023500,591,984475,413,00002,334,720
44Jul 20, 2022 15:1297,027546,676,691475,432,11902,207,744
45Dec 10, 2021 02:2097,028504,428,754474,435,0001,000,0002,342,912
46Dec 10, 2021 02:1697,028504,038,056474,439,000998,0002,334,720
47Jul 20, 2022 15:1297,038542,858,454475,484,59602,207,744
48Jul 20, 2022 15:1297,041538,737,543475,500,41302,207,744
49Dec 10, 2021 02:2097,051499,712,422474,550,000999,0002,265,088
50Jul 20, 2022 15:1297,052499,718,370474,558,000999,0002,265,088
51Dec 10, 2021 02:2197,054541,204,078475,565,18202,203,648
52Dec 10, 2021 02:2097,059503,105,502473,592,0001,998,0002,338,816
53Jul 20, 2022 13:5897,060507,569,609473,596,0001,998,0002,527,232
54Dec 10, 2021 02:1697,065539,319,669475,616,25802,215,936
55Jul 20, 2022 13:5897,073509,897,817474,660,000999,0002,265,088
56Jul 20, 2022 15:1297,100504,151,103474,789,000999,0002,527,232
57Dec 10, 2021 02:2097,654543,124,569478,506,01702,199,552
58Dec 10, 2021 02:2097,655551,550,333478,507,54602,240,512
59Dec 10, 2021 02:2197,772502,009,749478,083,0001,000,0002,256,896
60Jul 20, 2022 13:5897,807501,827,982479,253,00002,256,896