QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#409059#7941. Jackpotucup-team228#AC ✓55ms7012kbC++202.9kb2024-05-11 16:57:062024-05-11 16:57:07

Judging History

你现在查看的是最新测评结果

  • [2024-05-11 16:57:07]
  • 评测
  • 测评结果:AC
  • 用时:55ms
  • 内存:7012kb
  • [2024-05-11 16:57:06]
  • 提交

answer

//#pragma GCC optimize("O3")
//#pragma GCC optimize("unroll-loops")
//#pragma GCC target("avx2") // doesn't work on Yandex
//#pragma GCC target("avx") // for old judges
//#pragma GCC target("bmi,bmi2,lzcnt,popcnt") // fast bit operations

#include <iostream>
#include <iomanip>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <queue>
#include <deque>
#include <cmath>
#include <algorithm>
#include <cassert>
#include <chrono>
#include <random>
#include <string>
#include <numeric>
#include <complex>
#include <tuple>
#include <utility>
#include <bitset>
#include <array>
#include <stack>
#include <sstream>
#include <unordered_set>

using namespace std;
typedef long long ll;

string to_string(string a) { return '"' + a + '"'; }
string to_string(char a) { return "'" + string(1, a) + "'"; }
string to_string(const char* a) { return to_string((string) a); }
string to_string(bool a) { return a ? "true" : "false"; }
template <class T1, class T2>
string to_string(pair<T1, T2> a) {
    return "(" + to_string(a.first) + ", " + to_string(a.second) + ")";
}
template <class T>
string to_string(T a) {
    bool first = true; string res = "{";
    for (const auto& i : a) {
        if (!first) res += ", ";
        first = false;
        res += to_string(i);
    }
    res += "}";
    return res;
}
void debug_out() { cerr << endl; }
template <class T1, class... T2>
void debug_out(T1 a, T2... b) {
    cerr << " " << to_string(a);
    debug_out(b...);
}

#ifdef LOCAL
#define out(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define out(...) 42
#endif

clock_t start_time; void start_timer() { start_time = clock(); }
double get_time() { return (double) (clock() - start_time) / CLOCKS_PER_SEC; }

void Solve();

int main() {
    ios_base::sync_with_stdio(0); cin.tie(0);
#ifdef LOCAL
    freopen("usr/share/man/man1/input.txt", "r", stdin);
#endif
    start_timer();
    Solve();
#ifdef LOCAL
    cerr << fixed << setprecision(3);
    cerr << endl << "Time spent: " << get_time() << endl;
#endif
    return 0;
}

// do something, stay focused
// look for stupid bugs
// guess, slow, stress
// don't overgeneralize
// don't rush

// don't waste time on standings

// SOLVE THE PROBLEM OR DIE TRYING
// THE SOLUTION IS ALWAYS SIMPLE
// THE CODE IS ALWAYS SHORT

const int N = 4e5 + 5;

ll a[N];

void Solve() {
    int T;
    cin >> T;
    while (T--) {
        int n;
        cin >> n;
        for (int i = 1; i <= 2 * n; i++) {
            cin >> a[i];
        }
        sort(a + 1, a + 2 * n + 1);
        ll ans = 0;
        for (int i = 1; i <= 2 * n; i++) {
            if (i <= n) {
                ans -= a[i];
            }
            else {
                ans += a[i];
            }
        }
        cout << ans << "\n";
    }
}

这程序好像有点Bug,我给组数据试试?

详细

Test #1:

score: 100
Accepted
time: 1ms
memory: 3576kb

input:

3
2
42 42 42 42
1
42 69
3
1 2 3 4 5 6

output:

0
27
9

result:

ok 3 number(s): "0 27 9"

Test #2:

score: 0
Accepted
time: 11ms
memory: 3776kb

input:

47988
3
1 6 4 4 5 6
3
2 1 2 1 1 6
3
2 1 4 1 1 2
3
6 3 1 3 6 1
3
1 2 6 2 4 6
3
1 1 2 1 1 3
3
4 3 3 2 5 4
3
5 1 3 3 4 2
3
6 1 5 4 2 1
3
2 2 6 4 4 4
3
1 3 6 1 2 5
3
1 1 6 4 2 2
3
2 5 3 4 3 4
3
3 5 6 1 4 2
3
5 3 3 2 1 5
3
6 3 2 3 3 5
3
5 4 4 4 6 1
3
6 5 6 4 4 1
3
5 6 4 3 5 4
3
1 3 4 3 6 1
3
5 4 4 3 6 2
...

output:

8
7
5
10
11
3
5
6
11
6
10
8
5
9
7
6
6
8
5
8
6
5
9
8
7
11
10
8
7
9
10
7
10
7
9
10
11
4
6
6
8
9
6
4
6
6
5
7
8
10
6
6
8
5
7
5
7
4
4
9
7
5
5
6
13
6
7
9
11
7
11
6
12
6
8
8
6
10
3
8
8
7
6
7
7
5
9
7
6
10
6
5
8
10
5
9
11
7
8
8
9
10
5
2
5
9
12
10
5
6
13
6
10
8
5
9
7
7
5
8
8
9
7
9
8
10
11
10
7
11
10
7
8
13
10...

result:

ok 47988 numbers

Test #3:

score: 0
Accepted
time: 51ms
memory: 6980kb

input:

1
199996
95228303 201285494 63848235 748936712 940169142 379639162 189291770 224201078 335564466 792345215 948056869 35198826 312793561 194588099 297198853 665606109 163797196 584404459 996890415 458867609 331820116 713293915 858136035 520976262 519894660 918315819 660535535 639896052 141007070 1151...

output:

99930544580090

result:

ok 1 number(s): "99930544580090"

Test #4:

score: 0
Accepted
time: 48ms
memory: 6760kb

input:

1
199998
527515482 831759304 786398217 142876272 541300660 926936654 117644051 72438862 579434512 298922247 726038416 333034763 721144032 811978092 585764800 216757507 702854739 157207076 124829370 951519274 884953479 246664247 437913730 867100723 186107370 511591980 673723365 46011051 452152759 270...

output:

99996151624193

result:

ok 1 number(s): "99996151624193"

Test #5:

score: 0
Accepted
time: 50ms
memory: 7012kb

input:

1
199996
664835369 535862041 172511710 536815834 363770542 769201437 45996332 625709355 118271849 100466570 798987255 630870699 908156139 60771864 242926966 399312687 905475794 730009693 916331839 370542011 733054133 853663508 722724134 623290601 852320082 809900849 350474706 862191469 468331156 761...

output:

100116660823527

result:

ok 1 number(s): "100116660823527"

Test #6:

score: 0
Accepted
time: 50ms
memory: 6984kb

input:

1
199998
728526329 166335849 895061692 562159176 891273133 980062441 974348614 473947140 67174604 607043603 282001509 560110415 316506610 973129149 531492913 655496794 444533336 597779601 44270795 789564748 917591276 755630061 302501830 969415063 854969281 108209717 953597119 604742957 484509554 621...

output:

100018948223594

result:

ok 1 number(s): "100018948223594"

Test #7:

score: 0
Accepted
time: 55ms
memory: 6980kb

input:

1
199998
865846216 165405878 912578966 251066028 787371942 822327224 271297114 322184924 311044650 408587926 986354129 857946351 798486009 926955630 525091568 543084682 647154390 170582217 835773264 577183705 470724637 952563905 660941162 315539524 521181991 406518586 335381168 10857956 500687951 11...

output:

100025665413653

result:

ok 1 number(s): "100025665413653"

Test #8:

score: 0
Accepted
time: 54ms
memory: 5876kb

input:

2
53064
626000898 221967145 345169505 82068734 702234813 12584781 696818177 437027007 675473634 401025770 489012528 838016710 229255283 146265714 58851900 50317524 118508121 443178663 688346675 26420200 243286360 900568139 507939681 714342908 406102977 701868009 826713254 705530551 980176160 4536422...

output:

26530744175424
73569146862151

result:

ok 2 number(s): "26530744175424 73569146862151"

Test #9:

score: 0
Accepted
time: 41ms
memory: 5472kb

input:

2
86135
961507416 239484419 739109067 683200252 618128524 645969771 881492450 680897053 477017958 105378389 491881172 246367180 773016348 434831661 610003299 884342359 986278030 866084911 812402121 210957343 850285621 553974762 854064143 85588326 704411846 378619350 232828254 353112728 840052815 818...

output:

42934121973753
56977997161346

result:

ok 2 number(s): "42934121973753 56977997161346"

Test #10:

score: 0
Accepted
time: 54ms
memory: 6112kb

input:

2
114819
665610152 257001693 764452408 210702842 755360600 574322052 434762943 924767099 278562281 588392644 789717109 728346580 95439048 723397608 792558479 791996121 854047938 362620087 600021077 764090705 383655953 133752457 200188604 383204817 666284226 686774472 975379743 369291125 331333250 84...

output:

57420485163798
42578962617890

result:

ok 2 number(s): "57420485163798 42578962617890"

Test #11:

score: 0
Accepted
time: 48ms
memory: 5900kb

input:

2
51745
296083961 979551675 158391969 33172724 671254311 502674333 283000727 168637145 80106605 661341483 718956825 505293270 639200113 11963554 48742585 920988247 426850554 154122555 19043814 22256775 580589798 418562861 914909286 754450236 964593095 994929594 86527451 680436815 822613686 213225598...

output:

25881624926612
74130073826645

result:

ok 2 number(s): "25881624926612 74130073826645"

Test #12:

score: 0
Accepted
time: 50ms
memory: 6652kb

input:

2
190655
295153990 365665168 478702602 929271535 513519094 431026614 131238512 412507191 881650930 439323030 721825469 618676449 961622815 5562209 231297765 828642010 294620462 282061512 438066552 206793918 482556350 998340557 966066456 420662947 557869256 671680935 829078940 696615212 682490341 652...

output:

95409727634935
4671014357430

result:

ok 2 number(s): "95409727634935 4671014357430"

Test #13:

score: 0
Accepted
time: 53ms
memory: 6140kb

input:

3
509
945103490 925258646 551206125 526700079 667773410 95427191 362812642 886786434 870232904 495179381 81906730 281227871 253895133 37646925 42217132 359205845 471862629 935227244 26261416 979759614 224254713 556220075 695518823 269277086 725271797 910519987 326988819 137416508 605439760 724706756...

output:

254897317782
81853407088195
17782477589248

result:

ok 3 number(s): "254897317782 81853407088195 17782477589248"

Test #14:

score: 0
Accepted
time: 51ms
memory: 5344kb

input:

4
25729
148578218 399443910 770570125 469317733 578441446 955615870 169612 119026676 783745328 338090837 820285414 826697750 460553174 534868797 912339208 373829181 515004940 372385878 645972324 522563583 864375197 101633822 580422775 216552232 275859942 529623463 963747478 462104612 760212230 83453...

output:

12842901508905
15657608024329
52744888692235
18759245129022

result:

ok 4 number(s): "12842901508905 15657608024329 52744888692235 18759245129022"

Test #15:

score: 0
Accepted
time: 50ms
memory: 4952kb

input:

5
7824
952714403 309407462 270862057 651390285 253451805 777116303 367820449 72311274 520646017 22906468 694467658 957088351 658924243 170505277 275795733 168411563 718510340 648621523 115839743 836093830 844185312 596601172 707832668 9796117 805887036 495111155 245140536 427121484 204604275 6740390...

output:

3897883004963
21470941810204
6807468154576
27861607127104
39997130182780

result:

ok 5 number(s): "3897883004963 21470941810204 6...6 27861607127104 39997130182780"

Test #16:

score: 0
Accepted
time: 54ms
memory: 5080kb

input:

6
7149
258310216 72406381 429371832 256320449 890499482 985210442 729473441 776830124 561964011 562237566 748590818 77946979 650009712 177762285 453221967 769667510 314834233 119181320 849281660 955333020 612779569 567709323 670103366 82150607 321442125 733209168 462626958 869644823 848320244 706702...

output:

3580713385215
15447830424215
24859433852945
1660454434922
36842914649039
17559466999717

result:

ok 6 numbers

Test #17:

score: 0
Accepted
time: 50ms
memory: 5380kb

input:

7
16819
578983413 502320670 554156386 667446173 234004214 18039387 959385303 395988845 135040182 876529775 496969717 203143074 6099910 32999662 115791971 981046945 417490189 157436781 66480727 628957967 353957051 109072249 284785251 852805803 884841312 424503504 534685369 727634172 946504457 2615944...

output:

8449227170463
52561097931995
3859833657219
20163697541394
5133365728553
5006728318917
4811661015625

result:

ok 7 numbers

Test #18:

score: 0
Accepted
time: 47ms
memory: 6300kb

input:

8
29021
616738706 483396102 75796643 146361498 306605334 510536702 598609899 707842799 668032243 989621382 756276437 908066463 317810067 461916433 278663435 10766349 834188123 103999508 645136364 845237487 843008426 561048823 974104064 667877236 796445467 904758625 196882683 186306199 953584113 4257...

output:

14474843502139
3671878194248
41988451047084
2231265415313
3144256636125
17557620654652
14146795430654
2711134138040

result:

ok 8 numbers

Test #19:

score: 0
Accepted
time: 46ms
memory: 4224kb

input:

9
37136
486264746 557776042 100187980 300203989 398124589 432634734 575612707 164567419 408644119 645846287 810033015 897587763 218106311 649908854 309075218 142343244 920179925 956282053 410146850 503315673 132279686 505467742 155945868 126918233 864766464 371163903 131140649 350606443 429219755 22...

output:

18541719993164
16183017890151
12370679925364
16812170749407
15345290650979
3142271250219
6970380829879
1703379972128
8832340912626

result:

ok 9 numbers

Test #20:

score: 0
Accepted
time: 40ms
memory: 4680kb

input:

10
5543
167330214 188915787 22596977 283315922 625320639 228617645 282545327 230150386 552702835 716228254 474861297 817414746 774990558 855963275 14435565 876904270 168862381 704047836 629575366 451396215 56903186 809266075 332272060 232038554 741712502 479043833 601664005 176505178 453922701 29541...

output:

2747340354947
3005965336263
4582104958081
1143173445179
13966371152776
8367076057842
9278270257190
31417225940236
15062958832570
10432841071347

result:

ok 10 numbers

Test #21:

score: 0
Accepted
time: 44ms
memory: 3760kb

input:

100
2336
727549620 741730767 408911556 945446245 572038064 685609097 128205004 829936008 281081951 754715688 816339011 33520063 908787051 515313288 551649559 542879422 387539530 197674304 87720945 641686985 185882310 676226017 871051739 957002232 2277122 142180596 415788089 732362363 798930745 37640...

output:

1160437624042
90973720924
112872654619
1040499828236
1112175574720
1705685170302
1294866858771
706910053349
11931509595
4284857629132
135987140716
1140514922536
845625514742
3577686465679
1167200840559
565484319764
84389228070
162914327752
1155384458897
113815247781
885307648317
20953705000
85738447...

result:

ok 100 numbers

Test #22:

score: 0
Accepted
time: 46ms
memory: 4040kb

input:

101
92
748815764 52836497 239211746 926328503 457005514 362549910 847956435 311908451 715487690 113473456 856164917 682059029 279376747 56020931 292111798 527630987 803997910 307425826 9505886 383939448 168148606 58064748 589134789 12889055 540816503 367442046 936570185 456635272 900824079 584704020...

output:

44268340683
1313338407907
202956733263
1039803272620
1826867882620
1633976781469
2293594499707
202626222644
110035426658
1727811569069
2014715872259
141746509420
2035134588550
1162107872246
854764764399
1876775251150
178191291885
2052876372
490891806160
37726416321
526379926260
1158743628808
9814602...

result:

ok 101 numbers

Test #23:

score: 0
Accepted
time: 45ms
memory: 4100kb

input:

102
8381
106826855 901573467 690684358 859805711 301927525 939605790 47767658 339823203 42011683 637340573 45265590 633374791 150326888 967715247 331285955 410321516 232163414 672292080 876963879 70136611 466416122 221267346 97129916 865823481 950499785 435745298 114339799 56643928 806249445 8722450...

output:

4215408934878
649043360190
2078547156737
419931436208
21887916510
232128080820
202577480785
331948921980
329769265864
2263123319843
1875335202577
353542120006
974555281387
152878280917
891418374698
345167442605
998129532497
404279099880
164046545398
439831232166
120884811969
703469599989
89499313330...

result:

ok 102 numbers

Test #24:

score: 0
Accepted
time: 47ms
memory: 3820kb

input:

103
1976
195338968 750007505 631202128 536272431 326222435 488659575 300595205 749211547 418516229 449941349 618776615 581069333 348351402 766344703 385241341 788304783 40110980 75021017 267091908 243363715 189836392 886403485 895863167 238590230 303516631 772044326 286092705 659198650 897547665 424...

output:

978494565769
206379430424
312559640696
1329788276927
1653652609319
1188993836343
126090820361
251109433933
38246090569
1296589231031
1932122619837
240430502666
798453737311
7805074542
39134168388
2615421443559
1363551695548
508897107998
1061869322769
716148984378
2498046665135
2346760920038
46432870...

result:

ok 103 numbers

Test #25:

score: 0
Accepted
time: 47ms
memory: 3744kb

input:

104
3135
440734432 34002325 770617337 49275570 224518783 556334499 677749773 609757302 518180618 677807366 85440706 392551070 275032379 286532239 713042372 407929882 568045448 464047205 430376724 116936241 265611637 294499073 190244187 802691745 724716145 441912554 880744075 996479249 668290318 3661...

output:

1549673911968
2302025701086
105040281117
632611166312
279588586172
262989981667
702411567065
82521650078
161681274320
177661420394
568713850464
1707221114516
1574233905322
645904887756
589548870603
496530354699
1579435304766
134649463235
88743618272
486209052695
971271225664
573983350744
13629395664...

result:

ok 104 numbers

Test #26:

score: 0
Accepted
time: 44ms
memory: 3824kb

input:

105
1344
341398731 140924924 255345283 517106502 606288000 390932958 291452596 663209190 179746663 773187226 78687347 892855845 637779960 407152564 766102586 661002502 838728098 454101507 981256278 324538759 773301926 301866859 382420672 966328624 807322208 726814614 322337818 435608448 512775190 61...

output:

663230053634
257298096073
34909830347
1528347187254
2392558082068
72544834288
898591785609
2335838488173
447500882861
935822802938
614169044685
2831725446111
715319300566
715124309511
1719738792429
24756615849
1354522264868
1275177133064
1153235371056
521809602619
409101648496
1340484218755
66320785...

result:

ok 105 numbers

Test #27:

score: 0
Accepted
time: 40ms
memory: 3952kb

input:

1000
1284
127329611 310153641 979675449 435569180 557896712 997251070 331469719 301259897 408998506 447544853 650045138 608994345 756769582 552399397 283995477 539927507 794577363 940833596 91286896 16474340 219502426 373372083 723985582 187881335 197540637 431880054 956881874 727205707 744966467 15...

output:

630747839528
192440057473
121797559800
73971957549
37129292627
31494460283
226089663438
148964086287
31763890943
317491525144
40952596086
83136853329
77642937827
4100662379
125285362109
386897807730
8386389141
49141993960
15195568398
36002620890
183995423231
18247968776
189846634686
77574324300
2854...

result:

ok 1000 numbers

Test #28:

score: 0
Accepted
time: 39ms
memory: 3956kb

input:

1001
151
419018897 327336549 728566446 963016996 623198669 814459281 68781665 620841283 415770459 386223899 656683897 250478036 463184092 486605719 860293795 467727438 296335144 865617383 924364943 639625856 849418565 405542994 515306818 421335958 555223271 165494879 115926459 74143264 240482760 718...

output:

75129098509
45565569015
93603471113
196243335830
215055635479
64236704520
44763649679
247432781058
19181942826
1387649921
96509598938
63169972738
163952369398
26984011209
36613345075
155270553841
47102910221
12500051125
180682213388
53128288516
31464315862
140230584337
405641709876
132248854413
4076...

result:

ok 1001 numbers

Test #29:

score: 0
Accepted
time: 40ms
memory: 3696kb

input:

1002
182
828478042 258127784 608700952 146291128 58614696 255200938 181077376 384274435 97404885 511927887 91473385 810037856 369688577 844167979 354857584 143136120 770325093 923862351 584584722 318578059 598733581 517193823 88273542 512394363 290239166 183179631 255581133 138974101 56773857 894905...

output:

88273151932
17471293702
7760311277
127788211164
68591396115
99870871996
2946806693
5346004418
222237690253
13306542194
380970286667
160825389140
26568248473
131902034220
93438722204
11154563946
37332714054
28017907497
2150089536
52270088233
72458835529
35835625343
119021041326
53689254938
8035360557...

result:

ok 1002 numbers

Test #30:

score: 0
Accepted
time: 39ms
memory: 3668kb

input:

1003
95
866216223 223356928 594707770 930639724 888188392 974818801 815931666 356449711 13728752 906722095 109814226 14729969 428437283 584116068 557045008 634718388 494283785 321317952 208098845 951154659 231613124 387193053 276615200 916291107 932922775 685890237 660812218 934243017 559926248 2609...

output:

46117604816
268732622640
131636870034
93250487859
69102764654
101104571229
53785937025
64642063914
165966904407
13486966716
12375271918
171044167134
163123097660
23982013047
37258449644
16651419956
188927856911
26230862117
259544010027
117341277059
302188826047
194571511499
79986352827
84134016726
3...

result:

ok 1003 numbers

Test #31:

score: 0
Accepted
time: 44ms
memory: 3716kb

input:

1004
322
106560487 635656060 28301232 594851267 621174715 293649166 669684541 81695101 826789337 11779289 347443083 76296784 643019263 46836711 798543560 933485549 914579192 66769814 872310812 492335340 686320816 439615481 839216036 36036576 449341379 279822259 860202943 769848584 244308680 68591110...

output:

162710727863
127717984210
129660369844
39352268309
86701338040
26164282126
86743568755
131456601127
166779883522
68459097400
21648909180
28629608326
98714533448
58657092237
24915660500
2163978569
101893131592
13849605162
115955580378
20368833409
90917038312
199852598961
21600620262
193777141185
7948...

result:

ok 1004 numbers

Test #32:

score: 0
Accepted
time: 44ms
memory: 3928kb

input:

1005
508
700063189 759616608 226398544 238080778 625481013 585888644 421087465 297128962 936200898 156760292 42779343 861243139 370268847 307938342 14958797 563036215 344288551 423303671 407975614 347858045 352650546 217610091 131894441 277358942 331754451 960886722 247481170 554374345 811895959 742...

output:

249443353243
27358940151
129308069514
27955054576
334961934530
228320698594
59451422943
47647952467
15035835715
73503780553
122580921573
83628822182
69277430769
17541788063
470251957
83782041086
87701478028
62624610142
84844269278
59297695996
3307043053
157398614114
127398544422
25657953670
45864948...

result:

ok 1005 numbers

Test #33:

score: 0
Accepted
time: 32ms
memory: 3700kb

input:

9995
9
199441079 80272045 691546667 916708126 5397408 250925470 458726120 833755746 21035844 304531310 79585774 432303032 668846878 499995845 55538702 559182669 116490629 643951846
1
159527279 682394395
7
740639447 752793882 24305816 227318082 489475213 885428260 656943634 997702307 481098840 981629...

output:

4591798668
522867116
3451453440
12716712411
12278274602
2388761174
2180358538
8349435270
11549681291
20915214351
10708442659
5882463335
9992172506
6798391468
9485803495
9573529353
2002321862
14063420014
14740085573
2467282498
18261574596
7715137062
279197676
9329221611
2812456214
13941814902
3491320...

result:

ok 9995 numbers

Test #34:

score: 0
Accepted
time: 37ms
memory: 3592kb

input:

9996
27
382674063 789481927 740897647 976448741 628751254 35292189 592376712 992191307 342474919 492270576 326719438 725690129 655972353 563454235 885622927 869720675 970619102 874393653 99197414 419576610 422371437 693380871 716641901 351751016 525660819 813453686 587808190 916243971 409926439 2970...

output:

13626595303
2751682880
10785928541
18294449258
4409795312
10970192778
7918815850
5557336421
2330491537
7308533876
3330866188
11290679741
11186517340
3890582403
843834717
2627604606
21891146575
25187819703
3984517903
3327711062
19042040
50029853690
42588607946
1294991906
4341257728
3182227830
4802185...

result:

ok 9996 numbers

Test #35:

score: 0
Accepted
time: 41ms
memory: 3744kb

input:

9997
15
139336026 660216122 283091274 346966886 957414578 503222526 371036622 818101610 942390109 943464476 970215911 22466688 142860081 223804982 699855597 579184000 351771936 169237333 417917143 116251393 94652286 871673550 721053278 316590943 717193687 443755805 234454373 405523174 634763079 9325...

output:

7569120206
833825952
18703041818
33866669289
52367079920
2699241607
751474459
3093817614
4608950616
9999478079
10401850233
3802775904
652497246
2054780099
24656493486
1524466242
4184786849
1621103726
1503272982
1538218228
12833473004
11983823836
6463177193
9993178415
25776034327
18257535378
11925547...

result:

ok 9997 numbers

Test #36:

score: 0
Accepted
time: 41ms
memory: 3932kb

input:

9998
28
385827709 742806027 111630838 380665999 15795737 617461263 334059980 510066333 162924458 321190190 952065146 931028614 686013207 351247365 712868590 676649170 35973174 761952426 569324454 492457717 608031473 99060271 915855984 64152105 368442556 394092827 833722115 917262921 782008188 122574...

output:

14289995639
7520132095
4844500181
1314740887
5333703087
790623850
37571534796
555899860
8265156578
6505484220
6383485497
4885716632
613943604
1536987204
8528931838
21353294749
4136509253
438483250
7528350295
7366921728
30151227541
5291488640
5198201584
3860416204
15344976964
21117752282
6260061356
1...

result:

ok 9998 numbers

Test #37:

score: 0
Accepted
time: 40ms
memory: 3716kb

input:

9999
65
176236592 18488953 102521767 193060592 144762162 179961909 183114152 863877794 245757032 658078387 581873400 35867308 816478213 428535638 752948645 801256686 977990157 935277202 647186136 801309279 716036352 551590663 690345622 982519893 246841490 630676504 366847619 650207322 860219946 6053...

output:

30675764807
6393305173
35038805327
17738588428
4648769457
3316426344
3258529421
5367340090
9141863011
7964093679
6033330767
1681719595
3853479293
6335122782
6675390960
1885263784
6975284568
10325871597
6695448547
23825605461
12685540403
4084696043
1915728906
4957473038
23940755675
7369627775
2888206...

result:

ok 9999 numbers

Test #38:

score: 0
Accepted
time: 36ms
memory: 3648kb

input:

10000
15
497432565 588591050 243417399 755895857 293124813 878145367 991193935 660045926 258481710 241115340 492762177 179350649 503748210 126727518 284529196 163731802 526844405 169420311 598711397 52641114 208304908 910771933 745932642 251446917 136564330 678921490 396046025 472662202 865602281 58...

output:

6806462958
1681547992
16019476507
1158602040
12859099162
5354512296
13565433575
2225062551
1392509871
1676872351
12653622579
10287183379
21087327230
5578629707
15641349522
1455725988
10366246289
11336664674
5974482913
5930918318
10944587091
9309561705
736045347
30302080879
751335758
5791039271
88449...

result:

ok 10000 numbers

Extra Test:

score: 0
Extra Test Passed