QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#582493#2544. Flatland Currency3un_larryfuncAC ✓21ms6556kbC++231.4kb2024-09-22 16:39:032024-09-22 16:39:03

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

5 57
9 14 31 18 27

output:

8

result:

ok answer is '8'

Test #2:

score: 0
Accepted
time: 1ms
memory: 3752kb

input:

4 50
11 11 11 11

output:

12

result:

ok answer is '12'

Test #3:

score: 0
Accepted
time: 12ms
memory: 5492kb

input:

100000 89648823509660
921733427 402270498 51157221 585477094 435728758 913951087 580580944 557082810 585086423 837912728 799129405 867009344 751591136 714946046 464999915 256043168 416678301 183246216 569365122 479031618 435168577 31068363 903791719 497652990 960987871 223120213 395437892 112869678 ...

output:

200414

result:

ok answer is '200414'

Test #4:

score: 0
Accepted
time: 16ms
memory: 5764kb

input:

99999 3234700062922
394766137 401419056 55997758 205712163 585962152 750591556 245421581 607883471 437707305 758188075 522354844 202404802 307099733 99935245 321784033 643800024 481548024 43007287 404431495 848761213 352455926 541535791 702868758 875691279 485597478 119612707 776231855 48839061 1144...

output:

61505

result:

ok answer is '61505'

Test #5:

score: 0
Accepted
time: 16ms
memory: 5100kb

input:

99998 86112926227914
869872247 684744959 824877228 56916375 758945367 128605666 283377693 33576989 443651099 153762116 163983342 366835792 816402292 863078123 487517337 884155303 155032070 26565182 354013355 820537114 239071699 443320558 470694592 531705267 151650392 734780493 229014960 750198362 64...

output:

200044

result:

ok answer is '200044'

Test #6:

score: 0
Accepted
time: 16ms
memory: 5400kb

input:

99997 68088898499161
684762234 212043311 111726077 799475781 502283626 527771716 232335052 250756028 374551362 101885838 831787899 187988661 488853660 347255010 936784303 526572911 618308527 763422946 682461738 114505538 466010668 976944572 410362920 865495559 378529442 962576489 11461567 119627044 ...

output:

200283

result:

ok answer is '200283'

Test #7:

score: 0
Accepted
time: 16ms
memory: 5160kb

input:

99996 31123987056923
811521298 923167157 268296554 713128986 529005433 6960604 560380182 915744363 677585658 283164493 623069887 93144993 785280453 273822868 519631154 173587478 894173238 309943194 185814329 887390123 613170876 277939354 675988088 550116615 485896461 227037085 722252712 239808335 32...

output:

187400

result:

ok answer is '187400'

Test #8:

score: 0
Accepted
time: 16ms
memory: 5484kb

input:

99995 91139805919556
450894725 525278995 449553688 598304327 433705782 895456537 123914232 273002894 616667006 697602183 149033912 491949510 15540278 42693327 52691855 294596279 130155839 148350866 694860784 228485201 18083366 140953026 690848775 96198613 412227936 593631893 221843918 735173984 7182...

output:

200713

result:

ok answer is '200713'

Test #9:

score: 0
Accepted
time: 16ms
memory: 5312kb

input:

99994 67034670830840
553137085 204710139 274056036 240585044 341821631 475856803 284003867 996450703 128779653 736218387 648508219 662402156 480212555 521751686 10550484 533354969 524242405 406277112 783479961 172994737 199250461 82614434 78653410 827438820 475150911 180706899 918964333 220980538 53...

output:

200496

result:

ok answer is '200496'

Test #10:

score: 0
Accepted
time: 16ms
memory: 5696kb

input:

99993 36781160415837
21578083 789828836 352590898 309342098 763543785 587415144 306693571 54214039 167763504 261699463 99817103 657836578 993145500 697275884 393294550 265277542 968071542 38198769 2701210 354554023 24369285 234491743 909684196 292006814 845478230 703274719 866473713 243970132 130064...

output:

197196

result:

ok answer is '197196'

Test #11:

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

input:

99992 42191781801868
646131581 9801523 748612444 889119663 683785721 678948237 768920069 118833474 745215515 272130908 344810642 895201366 434228570 635662952 127653217 382524680 986110783 833258657 931235236 568751733 645995951 724427051 854173860 829495299 66828956 847687264 298938163 58241456 146...

output:

200518

result:

ok answer is '200518'

Test #12:

score: 0
Accepted
time: 17ms
memory: 5048kb

input:

99991 25160109426611
944486913 391572327 68258312 76143226 203993453 938609554 473735421 501317936 167189998 236927051 638610803 412688425 765593330 976632225 77302695 866369842 333913678 941748 856949353 763693509 45979026 22106071 31461672 848002799 984292075 41140949 520755596 592587068 516812880...

output:

172360

result:

ok answer is '172360'

Test #13:

score: 0
Accepted
time: 15ms
memory: 5948kb

input:

100000 2661708139205
671058566 124672319 183392169 803800261 476253577 492641437 153800244 587660132 201506049 364528343 550963192 174930169 736386476 466746467 183504559 712271981 265455363 484100086 471130757 553825527 141503979 253998808 368050173 140606124 224727988 252991973 215757468 400699813...

output:

25017

result:

ok answer is '25017'

Test #14:

score: 0
Accepted
time: 18ms
memory: 6376kb

input:

100000 827521217316
40089276 22935121 27517762 20546643 12218188 27490082 8959159 10898508 17297167 5441024 7358869 8369649 34036971 34737391 20232933 8866509 12856783 9902794 16470293 13901658 7333309 11732498 37668186 24527362 9584909 7669644 20395948 28267171 40616096 13358083 20473127 17219747 9...

output:

125166

result:

ok answer is '125166'

Test #15:

score: 0
Accepted
time: 18ms
memory: 6160kb

input:

100000 27341744286289
242193848 493320977 251137178 493298896 356267737 160681949 214922483 197010188 626677871 280004292 461944157 361326847 493582897 298258493 653295821 198570548 254984972 315571582 354301561 377210402 424089861 584368766 100556569 429974037 428506626 172072423 104856149 41837094...

output:

225211

result:

ok answer is '225211'

Test #16:

score: 0
Accepted
time: 15ms
memory: 5728kb

input:

100000 302588405898
444978158 258233548 235353934 325817183 55922928 237654447 39147624 940238946 22318883 118298684 11244338 231765904 787610001 476872068 919013336 106565734 405854651 646211902 535002516 493683692 156206999 51160684 204078054 73529096 182887413 146755933 98981579 272170253 2208654...

output:

24990

result:

ok answer is '24990'

Test #17:

score: 0
Accepted
time: 18ms
memory: 5896kb

input:

100000 7738227752998
442107323 83591044 354015993 295402088 697395866 889533941 871802441 178784442 350420446 325712873 376959293 635164236 172646489 89530147 51744991 230449048 201217753 47832162 160841524 976873826 191221224 156746108 57174184 364179443 217400391 412494842 618792037 830525231 1054...

output:

125002

result:

ok answer is '125002'

Test #18:

score: 0
Accepted
time: 19ms
memory: 5848kb

input:

100000 25357310293416
310831787 102038583 166806202 653860612 246912264 561871817 507822786 113465911 276210282 119223647 249530229 129554184 54187483 55089809 695348431 113340889 13509596 81265333 304955877 263451516 993821136 167179939 181540399 666658892 297956407 385210348 245567609 287104957 12...

output:

225028

result:

ok answer is '225028'

Test #19:

score: 0
Accepted
time: 18ms
memory: 5792kb

input:

100000 1868303585177
162788559 219460833 132671959 107869654 140703299 668851946 136912029 119390819 363360853 108251799 173847769 549829172 650201471 316486543 333442163 119064789 303225057 335558302 338507568 157364169 180075014 259351948 329470883 171481254 657460941 166533569 141310674 253121368...

output:

19228

result:

ok answer is '19228'

Test #20:

score: 0
Accepted
time: 18ms
memory: 5764kb

input:

100000 12119266503924
126332884 426286267 136798334 163924424 447497657 148535204 124512864 191196279 194167199 180305589 781791161 589299726 325621282 367961598 128332029 189044059 183700834 251106708 333821212 376082138 110582624 197238114 369817528 577092032 186299694 149724124 391847712 38871092...

output:

95934

result:

ok answer is '95934'

Test #21:

score: 0
Accepted
time: 18ms
memory: 5808kb

input:

100000 10729854101733
320234391 138206852 49426234 126414053 81938809 51878074 48696199 69358354 60704899 54962204 46674924 48696139 65414089 191884037 248803826 297175551 159457773 84648599 80097994 59689049 59873724 61525449 43392129 74320204 150632518 64712119 237800986 55630969 278791076 7310679...

output:

172793

result:

ok answer is '172793'

Test #22:

score: 0
Accepted
time: 18ms
memory: 5760kb

input:

100000 231224450213
919064666 214121334 166182329 118160604 446926713 585695117 185895589 356818096 99425614 75589544 582134522 800047976 204551439 12613859 199071277 338611913 503432797 72339079 123962758 228113334 316575286 52675579 65083573 942952331 339053663 40053174 56284873 170010699 73246109...

output:

19190

result:

ok answer is '19190'

Test #23:

score: 0
Accepted
time: 18ms
memory: 5608kb

input:

100000 6002879042353
29695679 400285528 98460158 49182849 216411849 242061199 164531239 337449303 124001609 43495967 136137979 245012814 224136521 514320347 27619529 595933712 106771019 106883908 254683947 206840254 109933934 486194728 145406438 8102376 382095697 465154056 132709673 266901577 667645...

output:

95867

result:

ok answer is '95867'

Test #24:

score: 0
Accepted
time: 14ms
memory: 5836kb

input:

100000 19395212157267
218694917 159989624 948801081 74959128 158292473 7621574 773749691 4936168 563361027 464054043 104490614 97136859 236860524 209886728 179994489 602381527 556684211 394765168 30249924 4056444 243693109 176509364 224604389 107302814 243814339 154583269 46571779 361889548 34636119...

output:

172753

result:

ok answer is '172753'

Test #25:

score: 0
Accepted
time: 18ms
memory: 5768kb

input:

100000 3369414440752
648800129 543365091 676677334 828857801 844466271 546163641 852440301 901682528 793614186 798994924 544276499 771316722 796592927 816464121 848409153 904604548 847168244 685266367 856585294 688528732 711958822 510306147 719081587 901483287 770951781 930909497 504166131 502508181...

output:

25001

result:

ok answer is '25001'

Test #26:

score: 0
Accepted
time: 15ms
memory: 5892kb

input:

100000 19810958230342
582221833 643922059 527933074 477100457 547525327 664025133 750708746 489763704 531111162 631924259 666212017 789289202 656185179 584201447 635197564 709702976 568514314 737930126 734962319 520526894 556710854 715521036 507387481 439574516 702980703 440586249 623196698 52899088...

output:

124890

result:

ok answer is '124890'

Test #27:

score: 0
Accepted
time: 16ms
memory: 6000kb

input:

100000 23360893432175
217643234 374761649 324866297 243654504 380849091 248085983 348076783 210279508 386430657 301772728 391513147 210023948 381598349 247532511 250859871 376316377 311102574 329281218 368667756 386925582 400229001 353485447 236363022 214552801 273789604 256576317 358108609 39390420...

output:

225133

result:

ok answer is '225133'

Test #28:

score: 0
Accepted
time: 18ms
memory: 5908kb

input:

100000 422226718305
106603409 474509364 159111049 82590727 742183721 58217028 349372032 635301684 64692096 573472012 384337717 45989027 451208361 92475309 293145946 379152921 15014941 181465933 477884263 195565506 455870227 593262264 54197163 591930378 51749186 942241837 448133076 878495038 11296369...

output:

24995

result:

ok answer is '24995'

Test #29:

score: 0
Accepted
time: 19ms
memory: 5976kb

input:

100000 10438562725606
505816658 543996541 481842753 346037029 172556063 749336916 203352279 207298694 107156783 112984194 396629443 218527896 520423268 749445742 620437429 941185621 526020971 909857243 66980601 72838537 630177837 163627468 70598651 313723774 268078838 24051338 412703167 546959854 27...

output:

124924

result:

ok answer is '124924'

Test #30:

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

input:

100000 34998200719402
571049959 943421856 723932388 513042447 863852016 14860306 845998108 30413764 106218719 804285564 392441258 42687731 545987787 965885001 8857427 446204031 960081997 163408637 332440763 956588286 646716521 240716442 919648732 802447091 853396551 899313961 392109803 915509539 594...

output:

225320

result:

ok answer is '225320'

Test #31:

score: 0
Accepted
time: 19ms
memory: 5704kb

input:

100000 264832552872
48375889 54436299 52108064 71273656 63572624 61808704 87224199 78831322 84518381 49549174 67233529 65530459 62560862 67315474 64603504 57862681 92134739 75700869 50697598 89784957 67662688 69110728 54900649 90300794 74369904 52604569 86383059 84665539 92176884 56947174 68318509 6...

output:

19180

result:

ok answer is '19180'

Test #32:

score: 0
Accepted
time: 16ms
memory: 5696kb

input:

100000 13627653118741
437530948 572694107 443584363 462332949 410775704 374414089 443954109 483250247 395703953 549766907 502403087 385098134 553031332 346284784 415287514 569997022 524704044 524315194 475004181 335448414 649891662 611227114 632079326 555535447 506482472 641487834 659177144 38861248...

output:

96055

result:

ok answer is '96055'

Test #33:

score: 0
Accepted
time: 15ms
memory: 5868kb

input:

100000 31566884066714
308010698 378291098 427064432 329480121 478026034 431640019 443376576 363000901 360710804 300279659 470553139 509893022 345537559 539186367 527917894 440579514 292558264 291395319 383943979 479965218 434387714 308886638 281568596 318482884 478343959 426657496 282084419 29351065...

output:

172201

result:

ok answer is '172201'

Test #34:

score: 0
Accepted
time: 19ms
memory: 5616kb

input:

100000 378787615198
73071194 769959187 132375553 695409313 208432169 762804677 524448944 131174028 581228036 425606348 511483489 665669197 652269284 391063009 599928306 339919064 403333874 257958104 910976769 810114908 420995254 804487787 294738128 253312918 313717227 500049604 360987413 596498419 9...

output:

19199

result:

ok answer is '19199'

Test #35:

score: 0
Accepted
time: 15ms
memory: 5600kb

input:

100000 9557979221628
107318851 567239273 122575501 515253189 73227434 927629553 772082143 239024424 122460179 595249784 406671609 154092472 812239313 696403057 976066484 947128759 377053909 515854536 709555279 331945259 676455948 910322963 603071938 466707044 358851104 640096784 51377824 294872787 9...

output:

96082

result:

ok answer is '96082'

Test #36:

score: 0
Accepted
time: 18ms
memory: 5832kb

input:

100000 34732776389051
657077443 416078242 273907962 366760179 517554711 382315797 439952313 535787229 80294649 635831904 978392436 216144692 827381254 216744322 365823719 678365958 625727887 815938169 853010624 677281156 349614149 959674339 180062042 358076979 62703444 588338323 624586084 347566019 ...

output:

173236

result:

ok answer is '173236'

Test #37:

score: 0
Accepted
time: 19ms
memory: 6556kb

input:

100000 1667710404674
290791032 241887467 233326542 110467399 172266613 424388561 191020173 168469028 202865428 98802209 213550617 402002141 116388014 153184808 371653687 142746203 341966272 455372786 120957704 235752043 493147306 236963488 195987323 294535086 428940976 256618692 494322861 160194928 ...

output:

25041

result:

ok answer is '25041'

Test #38:

score: 0
Accepted
time: 18ms
memory: 5888kb

input:

100000 18728004391261
613996532 621766732 275607978 549226297 199282359 602497471 656015007 208468894 322708348 677906507 769915846 435916432 854463306 139910404 391388743 305623353 365204542 662400772 713993502 594219061 364113148 641321281 154511689 741671381 151076229 466742582 225627939 46897357...

output:

124987

result:

ok answer is '124987'

Test #39:

score: 0
Accepted
time: 15ms
memory: 5696kb

input:

100000 1456254928599
24414647 12392583 17647642 5453024 24975696 22079072 7811804 13001758 19041761 4538484 5294994 35324421 12197803 35241221 15788982 14968358 5412464 4681174 11763068 19591456 4739799 6226744 6782564 5346609 7654614 23081487 18133762 10852653 15059273 9273238 17857463 11794293 162...

output:

224735

result:

ok answer is '224735'

Test #40:

score: 0
Accepted
time: 19ms
memory: 5684kb

input:

100000 345870159034
43837457 385310206 484489973 148913614 688057651 769869126 534302286 214191289 688405236 606218232 343407253 154617969 497370031 168218807 879908326 332450453 507996402 389265191 220112554 153320252 35843644 856694481 363874778 540806932 805121306 141913192 432267678 455417307 25...

output:

25013

result:

ok answer is '25013'

Test #41:

score: 0
Accepted
time: 15ms
memory: 6224kb

input:

100000 7780658162958
322333117 27990998 481561133 216116509 116326424 915786356 490373416 457284787 244246416 321106633 774223701 912866281 168022971 155800079 223044258 282161322 348299022 65544179 25601434 674617892 202372806 305562946 228811713 521223501 525725371 41707629 155439969 95400254 3588...

output:

125018

result:

ok answer is '125018'

Test #42:

score: 0
Accepted
time: 15ms
memory: 5700kb

input:

100000 25772504140193
341798413 170015727 438767872 290879923 752982376 130267059 70110194 203323523 90089349 280994852 244651509 170015822 314377233 487207767 155206104 102684889 132253329 16400264 138771063 36770614 30163169 635053677 232469478 943673141 19852544 176052474 362138488 93401234 62510...

output:

225039

result:

ok answer is '225039'

Test #43:

score: 0
Accepted
time: 18ms
memory: 5864kb

input:

100000 1262780146677
107749634 202197633 289869411 232688722 114600954 95231684 85062184 342791736 127097033 317007702 425351321 115484184 253520167 91693769 189170318 106521209 85790569 116816719 442929571 224349543 65171864 202002427 220016163 263631622 62898214 188953558 215785657 111972319 79249...

output:

19202

result:

ok answer is '19202'

Test #44:

score: 0
Accepted
time: 18ms
memory: 5812kb

input:

100000 2305519025143
22541894 25755914 41743398 23593209 20925934 76641568 20398929 22631949 25974154 69727073 42347143 35678829 37160549 140943371 101745746 54269443 88996572 115042281 31365474 101912812 36534439 33534689 50785853 34923449 67119438 55385818 21219459 30285894 56978873 85253087 25910...

output:

96075

result:

ok answer is '96075'

Test #45:

score: 0
Accepted
time: 14ms
memory: 5888kb

input:

100000 30440169714871
213259539 672251312 367533293 148917599 716065072 425616557 450352088 202221114 167345819 165469324 722154912 183942299 428254312 948314501 179727929 696924132 225424929 233219089 166976744 267491248 353682058 368197378 208662144 541687592 195869304 501223802 167304084 22251923...

output:

172774

result:

ok answer is '172774'

Test #46:

score: 0
Accepted
time: 18ms
memory: 5604kb

input:

100000 237758909908
74007963 50960724 82473709 278224997 200123444 59317453 864895731 34567819 14348733 42465559 194675799 329573311 188550599 73538084 651523207 92741819 201845134 458445073 26855954 214937058 401857373 190059034 254936448 358153288 313813657 42672429 349839312 11609689 28799707 629...

output:

19204

result:

ok answer is '19204'

Test #47:

score: 0
Accepted
time: 19ms
memory: 6008kb

input:

100000 5734184735634
81917864 410036257 86227894 239478491 485202387 126905124 144623169 187215459 452497501 564562587 47461598 335100608 133751864 434491423 144620208 335626083 22921104 195860266 55182974 61244739 25199509 152469944 187088844 66581577 74301947 105675272 205156329 149007143 72166904...

output:

95780

result:

ok answer is '95780'

Test #48:

score: 0
Accepted
time: 18ms
memory: 5700kb

input:

100000 19271671265454
234566604 17447144 112284677 705461012 187373509 96536202 617121982 230646519 175253963 20927359 496928541 2140594 729614122 6660029 64321392 162358694 160622202 657044627 217432704 304764533 167310164 445199953 109744997 112819304 406459002 230646584 184423788 106759054 181986...

output:

172411

result:

ok answer is '172411'

Test #49:

score: 0
Accepted
time: 16ms
memory: 5696kb

input:

100000 831011147474
143344807 151821508 144569203 118744837 208785161 187867674 143804446 132435487 136120413 153344472 224401187 199763848 215703887 227988252 210132076 209278448 215968859 227862404 146601386 188888348 141050786 203176701 174309951 203851838 182089437 131913192 140043378 155193779 ...

output:

25000

result:

ok answer is '25000'

Test #50:

score: 0
Accepted
time: 16ms
memory: 5832kb

input:

100000 12565070001078
394330964 400051118 431825568 473486814 383097423 472139112 445296392 485199796 287761311 482551071 280490848 410703689 465589759 437813589 451608011 467918803 304452372 464589277 515028876 530913414 292561101 381110483 522277839 394772331 282291116 312789082 375048921 50739225...

output:

125015

result:

ok answer is '125015'

Test #51:

score: 0
Accepted
time: 19ms
memory: 5676kb

input:

100000 56164840431703
606704504 921086158 748145629 934057987 880590048 615704227 658661416 766454633 621764891 834419892 855745756 804839388 588529438 809706607 673384447 597969419 849351533 970332891 512049546 954433052 556120393 827862477 541607374 509275454 562533729 762098444 803650328 93552441...

output:

224964

result:

ok answer is '224964'

Test #52:

score: 0
Accepted
time: 19ms
memory: 6028kb

input:

100000 442897939721
834760588 116682523 601742341 592383612 974901591 323033577 960249782 463706073 441727318 909393172 293492261 578233579 754442489 577058072 526585249 821883028 952924274 762065228 541005023 333645448 384964683 44221917 579299711 587638972 145930157 215603394 235824066 837915468 1...

output:

25018

result:

ok answer is '25018'

Test #53:

score: 0
Accepted
time: 10ms
memory: 6116kb

input:

100000 10229124976224
873917384 1314793 677998276 812819517 426522871 894953522 889837028 771323006 838803077 850671303 179688184 680554989 331456352 878362617 416731206 124920299 761388934 666028992 991314391 257779436 386808138 390253024 764442463 867314874 328673038 347305136 152271436 829829719 ...

output:

125126

result:

ok answer is '125126'

Test #54:

score: 0
Accepted
time: 17ms
memory: 5708kb

input:

100000 34946710064430
339639189 954983589 463172659 431943944 355711951 240934188 386550741 553140697 902552662 642116041 290403979 343373326 93441091 817824507 813677148 219243692 93588938 559225597 12276162 89205243 81511709 116704396 767232457 445249353 498628256 521398958 544579911 441554062 972...

output:

224977

result:

ok answer is '224977'

Test #55:

score: 0
Accepted
time: 18ms
memory: 6136kb

input:

100000 2569899789128
554998356 534299444 864299069 854317787 490480926 526275909 591566419 764969589 637505834 563269324 889966554 845074519 757400354 613024549 759585121 820334044 646318244 656012311 755315854 680424559 498995294 632425844 881107029 797937968 494247214 870944128 535871079 465734314...

output:

19187

result:

ok answer is '19187'

Test #56:

score: 0
Accepted
time: 17ms
memory: 5576kb

input:

100000 135952545714
4919748 6419711 5768774 5089694 3755418 4329053 6518609 6362291 6158889 5940064 5282499 4154619 5254759 5296079 6476104 5000317 5677484 3569216 4219762 3353429 4201612 5825006 5354621 4229818 5309019 5793294 3310713 3521293 5774922 4515032 6388428 5136718 5971557 4802121 6383908 ...

output:

95921

result:

ok answer is '95921'

Test #57:

score: 0
Accepted
time: 20ms
memory: 5820kb

input:

100000 56143046302303
932130009 856801717 644438082 926307978 742650926 587451059 637155757 680044687 641744836 819714889 496749533 604103056 815999822 951462342 680977588 656998399 718661994 921757614 740517734 756435871 857176489 754812766 612017686 526369093 939759753 742824628 594687259 49757118...

output:

173031

result:

ok answer is '173031'

Test #58:

score: 0
Accepted
time: 15ms
memory: 5816kb

input:

100000 417787006413
663023553 701906947 970047343 882168204 323957084 241677567 392805033 203767131 475798759 500082229 283488129 589781534 421533807 228255431 285389598 630078484 662696879 198140974 910814854 83455264 616548974 197853321 523364599 99777453 82905989 749578044 986826772 425744619 163...

output:

19210

result:

ok answer is '19210'

Test #59:

score: 0
Accepted
time: 19ms
memory: 5600kb

input:

100000 9697266443780
648107283 737774502 425249529 406873978 657055894 609971749 564697238 914825764 390035249 424453984 468080589 765338199 660003729 799646838 887599446 406045684 208806069 324301108 935842771 89579871 637415484 619068499 58423547 737413698 377250051 215034133 836836957 507601406 3...

output:

96044

result:

ok answer is '96044'

Test #60:

score: 0
Accepted
time: 13ms
memory: 5908kb

input:

100000 34675200275262
599711529 920778518 55379334 351527273 453859787 428871978 885961583 99297327 711933644 646530257 841278859 902386589 823416571 710760274 410543869 960701998 94971929 682061477 458209564 715148312 889515682 479780092 619698979 753217453 639644571 380647182 456925281 367247659 3...

output:

172946

result:

ok answer is '172946'

Test #61:

score: 0
Accepted
time: 19ms
memory: 5748kb

input:

100000 1849277319988
251584893 403550991 265105518 111585899 330633227 440848211 247343418 556077966 373382016 216914318 180268798 313726101 537586986 468102131 73908304 200111538 363412442 117534599 71433254 435484056 229701257 242629438 503167141 143083818 91778314 110208134 240021823 251201992 35...

output:

24999

result:

ok answer is '24999'

Test #62:

score: 0
Accepted
time: 14ms
memory: 5752kb

input:

100000 19237801035169
171146164 162762309 652296702 466510348 513444312 257341308 958721221 388203778 615612007 403714648 212043049 652469587 472854058 241004059 688437606 803027421 695767466 345561328 290447618 200956284 514722461 379182923 303855903 724293776 475924932 516334762 142155819 22332201...

output:

124868

result:

ok answer is '124868'

Test #63:

score: 0
Accepted
time: 18ms
memory: 5832kb

input:

100000 37131596695407
416108068 596056477 161599229 196863654 303366778 543267332 114683099 624679917 315176118 346489238 593001367 223709574 431710248 894844026 192089879 406000092 391011303 154636069 362186488 171033159 810759191 675472822 595987741 200596854 187050579 395337853 489961271 33317726...

output:

225095

result:

ok answer is '225095'

Test #64:

score: 0
Accepted
time: 19ms
memory: 5704kb

input:

100000 381981763763
985882316 390943283 300061293 630609987 223416919 39600534 182012377 629740756 237336203 270573083 57865081 492555602 93422661 137132166 198345267 440335033 208045217 212319171 173967883 241968907 460596987 2472713 182434638 900883666 354487402 110295564 142123434 253858502 21783...

output:

24996

result:

ok answer is '24996'

Test #65:

score: 0
Accepted
time: 15ms
memory: 6364kb

input:

100000 8383752340843
347672106 28173262 524443512 227105479 461442423 557590491 6657828 262922522 355382752 919541526 598153967 48398383 426897937 302103806 89577383 441044896 505333647 500484476 24203649 376779573 326564947 102804239 222609963 737091846 97716799 76481504 248892124 236650332 8882465...

output:

125083

result:

ok answer is '125083'

Test #66:

score: 0
Accepted
time: 19ms
memory: 5728kb

input:

100000 20790511389026
462028693 13932281 12389022 96855404 475831542 424067688 102592859 40217633 614392472 148355404 237826007 438675407 524642851 651297212 462509928 189853511 235143606 232117183 464039192 114450949 622248282 233924814 64340763 310944187 13498469 424065953 409585863 35250174 17901...

output:

225097

result:

ok answer is '225097'

Test #67:

score: 0
Accepted
time: 13ms
memory: 5840kb

input:

100000 1020050272153
117529808 223706417 56557224 69730294 74573289 154631193 94492294 169407143 102475243 96965364 122634143 372972626 190195167 65207034 166432453 84611459 285428706 61697144 387404081 180841552 59842224 210023182 87166289 80578179 235669996 245970357 96853784 136692608 262759701 7...

output:

19191

result:

ok answer is '19191'

Test #68:

score: 0
Accepted
time: 13ms
memory: 5728kb

input:

100000 7792651859225
88204339 246244393 468965556 134021739 141915958 351731062 115963819 230657493 276612912 84652269 106418289 260123428 462265286 427688606 86300254 171402198 222721048 70275599 186649013 216906797 259749187 223247307 89534354 107149969 207668177 92206564 86543764 115327774 150833...

output:

96088

result:

ok answer is '96088'

Test #69:

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

input:

100000 18899744440009
105861059 142266014 101203814 98493429 241172612 111979084 267497792 121708534 196985108 502128001 345313067 247262078 136688404 127129484 144511559 95216964 272775802 144508519 289013073 261843103 222513478 557997586 344221451 118666274 379581977 122673069 305067022 108287029 ...

output:

172584

result:

ok answer is '172584'

Test #70:

score: 0
Accepted
time: 14ms
memory: 5824kb

input:

100000 194333227463
1566509 193363024 81046382 161769291 147594604 592907982 103748684 577298561 38875974 295206698 2441574 205146834 195528119 222256764 331951037 293703722 7195724 164787032 452767173 360986447 218439889 219712526 31868718 138724534 372209583 80405399 432284317 1757504 409258278 69...

output:

19237

result:

ok answer is '19237'

Test #71:

score: 0
Accepted
time: 18ms
memory: 5940kb

input:

100000 6029795209328
453905491 813400996 63320268 480243198 150872402 111905694 470928222 125505834 178956104 61660522 498733733 120937708 119987239 132943781 113472729 6171184 987361791 253378692 54338814 24216319 224434829 163948539 400332663 223432704 673792772 241675179 243206089 24213179 859880...

output:

95939

result:

ok answer is '95939'

Test #72:

score: 0
Accepted
time: 10ms
memory: 5616kb

input:

100000 20883518626615
160951769 181745979 123817259 240563134 373994157 331767297 142429859 123811969 446004633 100335884 736618171 132483289 181749079 927791656 472972833 484459666 401313626 248016784 8494847 192773569 179152304 161993317 36386619 82297794 249348619 26607583 169243619 207809894 264...

output:

173183

result:

ok answer is '173183'

Test #73:

score: 0
Accepted
time: 14ms
memory: 5780kb

input:

100000 3357604938510
828745527 811282481 902114643 806635629 960742758 885677944 734029236 929116284 642379393 796442382 801178167 701925353 811895567 621048003 641447793 690599578 599900627 767745643 842775837 786840084 807676384 870889469 780437364 612481996 557992549 624776579 512172483 908441607...

output:

25001

result:

ok answer is '25001'

Test #74:

score: 0
Accepted
time: 13ms
memory: 5972kb

input:

100000 12089207843320
499649174 476188987 499887171 279043702 460750546 381724222 271852307 261828329 406995066 499887476 503027513 349004342 383562671 387427657 269702148 444571023 391975397 374292127 321906484 320080257 483381327 423041538 399064451 452855346 467879859 464264601 406994766 48328431...

output:

124960

result:

ok answer is '124960'

Test #75:

score: 0
Accepted
time: 12ms
memory: 5748kb

input:

100000 22643404040919
277145027 355467199 301422378 289795357 282344332 288814314 373461438 302991298 240093069 381125148 276563272 314869142 336532284 239697242 228959129 311377874 291022916 316978992 382484333 304082173 337377181 346967173 287970938 271813032 219726251 318568946 350337274 31987338...

output:

224892

result:

ok answer is '224892'

Test #76:

score: 0
Accepted
time: 18ms
memory: 5716kb

input:

100000 392652044051
284286796 690577316 599327876 117027344 285315966 805617393 470666151 186989559 200931923 663761174 153271972 659551761 498192498 114076027 840672736 729409513 153951701 255742121 478309248 280054869 794043952 889675558 89711984 964408713 481392823 283382503 525456402 199150706 5...

output:

24998

result:

ok answer is '24998'

Test #77:

score: 0
Accepted
time: 15ms
memory: 6384kb

input:

100000 8864881279895
556972697 978139444 416690437 425417989 60952862 486624799 84000441 496557722 959991014 229788112 757051294 191010958 202807603 800179103 99857237 452946997 483290409 844199178 314370911 181420407 490672418 933271944 65926783 1550979 4612642 115553488 416690167 347887853 4966342...

output:

125216

result:

ok answer is '125216'

Test #78:

score: 0
Accepted
time: 10ms
memory: 5772kb

input:

100000 30952029696066
772859794 142220216 757879952 528233673 124720343 900837222 653664836 71602463 55137649 484229077 352564899 143097599 256227482 967846337 478735494 91236618 541275788 467060591 768407434 91882454 162958682 172185857 675307153 986181601 80782732 986755744 194810714 989372924 629...

output:

225057

result:

ok answer is '225057'

Test #79:

score: 0
Accepted
time: 6ms
memory: 5812kb

input:

100000 347303667738
76083811 113998824 65286124 92591341 107250484 77381409 90867213 102066968 82523394 63807989 84808684 105530832 110109364 82055464 114225579 69358884 118567738 67375598 100585546 71934137 65873028 67754029 103444649 75221949 100395729 110879798 82628399 91179144 104988094 1173410...

output:

19218

result:

ok answer is '19218'

Test #80:

score: 0
Accepted
time: 14ms
memory: 5816kb

input:

100000 17997862883386
874758232 709824017 863550499 738460359 539148646 564688811 700967827 592016242 724699984 896226393 565657109 524651879 730074218 823855126 696597252 854198767 676718534 761195023 682018559 596524353 457498114 894748658 652659519 733537269 508514608 592820981 478175169 48415781...

output:

96411

result:

ok answer is '96411'

Test #81:

score: 0
Accepted
time: 13ms
memory: 5796kb

input:

100000 14166245614717
190291064 190612293 208037082 205902469 215577052 132933323 136378554 194082104 157950689 224916084 207919873 180933654 228480114 226173217 194746392 198928369 160997869 134154653 142352339 134471997 205492943 172988209 234772379 123382913 233352283 125858494 178587277 17783943...

output:

173278

result:

ok answer is '173278'

Test #82:

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

input:

100000 588287481771
856811004 504098414 183207563 408579779 388828584 573545021 398587001 725696688 693897063 811227337 542916068 82152202 573350524 409326719 831950769 474598829 471214063 551654433 372214753 145305159 815782641 3803494 149811511 686657683 668293953 975528203 278386349 476171729 849...

output:

19230

result:

ok answer is '19230'

Test #83:

score: 0
Accepted
time: 19ms
memory: 5668kb

input:

100000 9517817331392
635101983 569358677 281371352 952130954 847981578 744378117 32049314 166388229 140558848 28912348 823808589 1662904 813045624 91259371 58432064 998693649 545868564 857263538 409214489 528802804 345500646 349282482 547303904 533791587 32049604 557179793 528802314 97230019 6530406...

output:

96179

result:

ok answer is '96179'

Test #84:

score: 0
Accepted
time: 12ms
memory: 5772kb

input:

100000 35811565862661
972806114 900422442 661661074 802131377 771749503 574519563 852422018 615344022 132333674 398017764 917211538 892709817 708213667 48345449 726677483 860446828 388977734 859283194 163237619 210882688 135342989 39916199 683711364 928707704 248780102 246994682 109185088 871574539 ...

output:

172835

result:

ok answer is '172835'

Test #85:

score: 0
Accepted
time: 14ms
memory: 5844kb

input:

100000 432098382362
28712974 58537402 52137892 56924158 57416103 113971296 58200592 57172138 34622088 114581866 52099932 57288048 86025372 38738773 38842683 57040183 86080112 28372619 57488278 57486123 77654841 76916161 85431912 85562267 114552336 19623894 77639106 57223543 85800927 28826854 1950394...

output:

25000

result:

ok answer is '25000'

Test #86:

score: 0
Accepted
time: 17ms
memory: 5772kb

input:

100000 33669698863
997181 1350461 477906 1496832 1428166 665237 1344636 1541161 1168501 783302 1721191 977532 353179 919903 647184 1262647 827177 849883 1643716 647893 407354 744333 304214 464429 755971 475138 367687 603868 1668967 238064 1094402 925198 1471741 325074 261338 641443 329839 572778 522...

output:

124884

result:

ok answer is '124884'

Test #87:

score: 0
Accepted
time: 13ms
memory: 5840kb

input:

100000 18455401192260
96724204 78626414 72542199 387388796 72615454 314224621 290273367 290279967 217855792 290669841 193690093 193686803 96761209 157548388 235644402 218009517 290696892 96953639 314132856 387731916 314388931 72665544 72516109 193668023 193687003 193561183 145331788 217943312 290728...

output:

225054

result:

ok answer is '225054'

Test #88:

score: 0
Accepted
time: 18ms
memory: 5696kb

input:

100000 1190943046811
143610062 440292303 880481596 803778591 880563336 660520302 191355496 190814271 440195623 440379583 602882242 220258814 660041597 220244579 602801617 219996954 220059794 95653513 143258662 142900187 191288291 95104683 95584268 401926853 880664966 880775426 660201587 95674008 440...

output:

25000

result:

ok answer is '25000'

Test #89:

score: 0
Accepted
time: 18ms
memory: 5748kb

input:

100000 7968583367157
304309232 203023228 101223489 203102588 216943151 304471987 405914536 405211331 108524343 630494767 54447419 405685996 304131347 108530083 304108142 406007891 840546916 108770603 304218317 217127961 217381246 54268654 303980652 101248239 420796083 217198421 405681991 840795711 2...

output:

125066

result:

ok answer is '125066'

Test #90:

score: 0
Accepted
time: 18ms
memory: 5844kb

input:

100000 30363102467117
284694641 479608653 958851446 105388634 284950296 315015102 210264708 210428693 142606013 479194893 142658678 142504498 420572746 959340626 213728372 141999818 479493843 958491041 719319122 239696574 958616996 959065481 479167998 420566846 142430398 284932571 284668531 23989288...

output:

225092

result:

ok answer is '225092'

Test #91:

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

input:

100000 1805315091005
201021688 100664494 301735612 126443959 100538439 100452529 402279376 126814714 253128653 281945532 107988379 402351081 253714273 187592668 187862568 93770939 126567319 126605904 107951754 188098783 201327808 108195574 94052689 200770278 127975559 127611964 126458454 201520948 2...

output:

19241

result:

ok answer is '19241'

Test #92:

score: 0
Accepted
time: 18ms
memory: 5908kb

input:

100000 17287072358136
128092074 128209494 579379417 386290408 195440079 579245352 771895656 195426634 202220339 193175314 192287824 128185304 386496383 195501464 385967753 384653058 128049494 127964259 128349544 771989976 256426288 384870528 579093677 577342812 192233414 772509366 202348569 57878699...

output:

95807

result:

ok answer is '95807'

Test #93:

score: 0
Accepted
time: 18ms
memory: 5616kb

input:

100000 21131486246051
137429779 198063864 129928599 130289854 520302601 124655499 350091827 136937834 233346743 466207896 129870619 233255433 137066034 137180544 116384484 198232679 233371208 259811988 116599739 129881344 130130889 349774272 349904022 466588616 466428096 233428378 116859754 35004451...

output:

172689

result:

ok answer is '172689'

Test #94:

score: 0
Accepted
time: 10ms
memory: 5624kb

input:

100000 1611371646374
219820079 289160648 349905112 219986704 349626142 434343622 53869849 219787799 116325314 232354823 233210723 466556196 466333996 349677682 434613297 144617569 53920789 53737784 579458961 54041144 219797539 434411437 289508353 232927913 289638078 233343268 349812837 144694254 116...

output:

19237

result:

ok answer is '19237'

Test #95:

score: 0
Accepted
time: 14ms
memory: 5812kb

input:

100000 3100851005473
107028722 106973682 120243774 142756561 142173131 35743224 107223432 240287033 71223438 17539244 142233426 71565833 42695294 240712528 240607788 120255069 34853903 81375439 34965488 17329839 360870497 361371252 120282499 17366329 34837058 81378259 241057088 106716387 71521703 35...

output:

96185

result:

ok answer is '96185'

Test #96:

score: 0
Accepted
time: 14ms
memory: 5712kb

input:

100000 22627414386685
101186424 234752913 75535184 221471129 352025372 469164531 75982024 221202529 75545669 117527234 468764936 351255557 117485399 468951186 151576633 468729896 101486804 151379673 442339923 45627109 663942192 45722614 663958512 234213838 664137337 101183534 75588224 234668123 3519...

output:

172891

result:

ok answer is '172891'

Test #97:

score: 0
Accepted
time: 20ms
memory: 5772kb

input:

100000 1757509527355
367029204 224459597 336885283 239015044 255531993 239047954 326637286 367054709 337361873 305522252 337347723 347715839 224441902 426669571 347719224 281141946 281152731 255541628 305551672 371968712 255529748 224446327 347736449 426686451 255513678 224461452 224443962 336892383...

output:

25007

result:

ok answer is '25007'

Test #98:

score: 0
Accepted
time: 19ms
memory: 5724kb

input:

100000 19574275775637
616513553 571770179 526137886 782508462 612083153 700036284 782507407 782506272 717184737 710047436 710057886 458010497 717169602 700047239 710075731 717199407 700022814 710036216 782497762 687593558 704695546 782516502 616518993 616528578 458035362 571763624 717200247 78253226...

output:

124980

result:

ok answer is '124980'

Test #99:

score: 0
Accepted
time: 15ms
memory: 5712kb

input:

100000 24831114986223
236385336 385552052 236398231 275329064 236363311 279389792 456582479 377795191 369730504 349117908 377782651 456590054 369727659 275310354 377826471 275329549 456603084 302087667 349130203 275302269 385555527 456611259 302110637 279401932 377802551 377825211 369721694 31553515...

output:

225018

result:

ok answer is '225018'

Test #100:

score: 0
Accepted
time: 16ms
memory: 5720kb

input:

100000 573521618153
787061486 16751888 670103046 16738103 986082883 16778628 192032234 620597904 670097486 192035694 286253772 787057511 342222134 761326677 761334787 192001664 16768258 192026604 342207134 192024739 16775063 761307557 286232717 16739063 16745293 16737963 787025416 191988954 38111146...

output:

24987

result:

ok answer is '24987'

Test #101:

score: 0
Accepted
time: 19ms
memory: 5716kb

input:

100000 5916053357234
263066959 791906108 341195596 511447608 90075286 511477393 263062974 974766032 791924783 791897523 341184326 341153901 263051309 341150236 492449729 263054719 822730037 791921178 974785907 106349192 215584828 868848589 822754502 90074286 90051076 492431619 868833169 868807259 21...

output:

125034

result:

ok answer is '125034'

Test #102:

score: 0
Accepted
time: 21ms
memory: 5684kb

input:

100000 38087088368635
617013278 212041362 996945796 158044431 691961658 617037763 42870349 158059726 466068882 848270736 617043883 996955171 158080016 691934643 705502927 592471444 705544657 158064851 212067867 52244064 705543042 466061422 617037598 996966581 52278354 592486014 996967596 705531907 6...

output:

224757

result:

ok answer is '224757'

Test #103:

score: 0
Accepted
time: 20ms
memory: 5596kb

input:

100000 2471266902465
539325118 490791129 745715167 460766941 745756447 535178359 745757112 527317069 550786989 527319909 535188479 611555613 550753639 745731272 733279848 550787384 535217954 527335384 490782614 745741687 417382692 793618579 527332059 417366372 539326808 641173031 793654399 550789829...

output:

19227

result:

ok answer is '19227'

Test #104:

score: 0
Accepted
time: 17ms
memory: 5568kb

input:

100000 5157998779066
232138734 232126754 165778153 135598897 135587617 140197154 219022853 232126069 122812984 200150329 197152557 140202509 205410561 135629822 122801939 219016113 219047683 232151604 205416746 200156904 161320873 122798979 140186109 232151109 161292703 140220029 165777768 219022183...

output:

95898

result:

ok answer is '95898'

Test #105:

score: 0
Accepted
time: 19ms
memory: 5736kb

input:

100000 44070466831378
521676109 521663889 644705359 521671254 405773669 720678024 390038786 521641769 521647644 662862829 390050811 497373638 608659078 658223377 390023876 662863074 474804966 390022531 390038046 608660678 662908389 497379863 743622233 390038426 390042466 743612968 521666659 40575674...

output:

172775

result:

ok answer is '172775'

Test #106:

score: 0
Accepted
time: 20ms
memory: 5748kb

input:

100000 99083252165
2258219 306731066 339480147 978369929 306758616 223973393 107842659 772406304 306742736 107868884 306749151 223974633 2232249 306741621 339486277 931416626 772408849 978370859 107864414 339481127 2267319 876709539 2245369 876725924 772433344 297690412 772444764 306761896 107886784...

output:

19244

result:

ok answer is '19244'

Test #107:

score: 0
Accepted
time: 20ms
memory: 6004kb

input:

100000 11395689871897
520803103 222258752 484504899 279076469 279085814 784891387 784878797 222261257 107532694 735516398 407811399 872313633 407822104 784881352 107532089 872294468 735519513 735478463 784897167 247900631 484464214 520845798 407811164 872302868 484466234 407807699 107544404 87231762...

output:

96130

result:

ok answer is '96130'

Test #108:

score: 0
Accepted
time: 14ms
memory: 5868kb

input:

100000 32840271970376
2776787 953438244 566136711 349376419 349386104 349384679 620930718 953439799 953429414 79489803 222690172 953440209 195111143 430672841 799219889 953438624 195123178 566158046 349384449 566169976 222702217 953452999 349372379 737579329 79502593 79495998 737543489 953450889 195...

output:

172954

result:

ok answer is '172954'