QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#525477 | #5518. Binary Arrays and Sliding Sums | solar_express# | AC ✓ | 435ms | 10868kb | Python3 | 832b | 2024-08-20 16:55:54 | 2024-08-20 16:55:54 |
Judging History
answer
# def calc(n,k):
# S = set()
# for u in range(1<<n):
# a = f"{u:b}".zfill(n)
# b = []
# for i in range(n):
# cnt = 0
# for j in range(k):
# cnt += a[(i+j)%n]=='1'
# b.append(cnt)
# S.add(tuple(b))
# return len(S), S
# # while True:
# # n = int(input())
# # print([calc(n,i+1)[0] for i in range(n)])
# _,S = calc(6,3)
# S1={}
# for u in S:
# v = tuple(u[(i+1)%6]-u[i] for i in range(6))
# if v not in S1.keys():
# S1[v] = [u]
# else:
# S1[v].append(u)
mod = 998244353
T = int(input())
for _ in range(T):
n,k = map(int, input().split())
from math import gcd
g = gcd(n,k)
t = pow(2,n//g,mod)-1
ans = (pow(t,g,mod)+g*pow(t,g-1,mod))%mod
print(ans)
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 15ms
memory: 10868kb
input:
4 3 2 4 2 42 3 123123 123
output:
8 15 780086989 126500246
result:
ok 4 number(s): "8 15 780086989 126500246"
Test #2:
score: 0
Accepted
time: 398ms
memory: 10864kb
input:
99944 718080 1920 605880 2805 729120 15 679140 135828 430920 133 576576 2496 646800 385 517440 448 827640 9 456960 8960 792000 704 429660 14 627900 13650 496800 720 686400 5200 617400 205800 871200 450 588000 73500 828240 30 475020 910 657720 60 621180 609 947100 4620 434700 138 457380 315 658350 31...
output:
335769117 273623682 392547588 336214457 285087249 574633940 958038986 615759706 264805918 908958106 519492096 192449697 874664743 60383440 483129242 986806694 397864564 784217495 81510969 501697672 361690760 823202525 617066320 245987065 604083737 554117819 901693380 806795470 114058084 168956834 43...
result:
ok 99944 numbers
Test #3:
score: 0
Accepted
time: 433ms
memory: 10832kb
input:
99898 977040 230 552552 25116 853776 28 578760 1484 462840 231420 938448 504 773760 6 120120 165 376200 3135 648000 1125 857808 28 999936 1953 888030 444015 915840 160 756840 40 759240 342 789264 168 456456 39 790560 80 923520 14208 180180 60 990080 2240 984984 82 348480 31680 208064 12544 777000 37...
output:
618432117 393174693 352060901 660585947 206840588 230782193 431709888 726083913 14301615 69202411 679544843 373920678 122166332 425329490 281669321 508788797 992018346 298230068 602078360 897150505 683114667 850063864 211496138 30522868 135388740 742149445 430436273 369083593 295293885 560358297 666...
result:
ok 99898 numbers
Test #4:
score: 0
Accepted
time: 393ms
memory: 10832kb
input:
100000 700941 233647 659082 2 640362 320181 684875 125 694031 53387 703922 351961 686594 3254 641366 2 658298 886 678155 135631 652258 101 664015 11 672662 178 709943 1261 650634 325317 679393 11 646472 323236 677663 739 706426 100918 650824 325412 675346 96478 687909 23721 667222 4478 673786 336893...
output:
349245912 643265102 656968663 741127449 307379736 119724550 465440610 954202361 1939181 219916988 460659545 90984403 850845328 920347562 621499407 632393686 430162744 317273168 532197508 993866508 174890869 413705377 828462457 462511063 540869613 70324788 918103710 812320122 360448005 80840857 65586...
result:
ok 100000 numbers
Test #5:
score: 0
Accepted
time: 395ms
memory: 10648kb
input:
99999 749817 9 13424 1678 28425 5685 999753 58809 990064 495032 93488 46744 735664 45979 312481 24037 509247 27 792464 16 3632 454 1552 776 477968 238984 459568 28723 6246 18 667489 43 338224 8 951472 2 177328 8 781936 2 12114 9 497936 8 156496 9781 998801 41 625904 312952 10527 11 179824 11239 9013...
output:
713108073 115867627 470200392 603753505 447631002 501434763 821715335 13350442 357789544 121990870 54596261 534957940 627922518 584541080 903866766 335668613 558420636 455123957 246685236 526698922 876850743 568029198 5431174 983713937 481656485 362574102 419105269 803984730 251957386 476475055 2121...
result:
ok 99999 numbers
Test #6:
score: 0
Accepted
time: 402ms
memory: 10720kb
input:
99998 252000 25200 843600 2775 857472 2112 569160 94860 532440 180 531960 44330 845208 60372 951600 104 933120 40 376992 8568 799920 9999 487872 504 274560 156 799344 9516 991872 2952 945360 117 973080 1060 396000 1760 947856 1092 399840 1785 251160 12 603720 258 769230 85470 274560 2860 759000 33 6...
output:
506975993 371306450 995603143 858269212 53352195 986438534 958135466 929743935 70734193 846461754 171862124 127992886 538513256 819592694 115344547 937599321 795983265 128093897 65726126 915103388 177138361 424352977 253295913 704780988 809227991 951183773 270512637 595539324 205542663 360418743 523...
result:
ok 99998 numbers
Test #7:
score: 0
Accepted
time: 397ms
memory: 10704kb
input:
99993 936320 66880 959310 3762 880992 672 750720 16 828828 46046 442260 1620 534240 19080 818400 96 923520 96 768600 280 709800 520 506880 7920 909090 23310 598500 85500 895752 44 959040 45 871080 25620 769860 2820 466200 93240 336960 520 586146 214143 741312 117 756756 108108 836640 2988 750120 789...
output:
717400587 521333121 678878804 601512649 724067878 947082879 691276148 308217578 266212257 850152000 261262122 368179302 493578326 364606885 332556719 245303935 245696540 975849232 605008807 312700707 165535281 669935895 614171452 315316174 62073278 833489474 168594529 392906417 508124574 35627466 87...
result:
ok 99993 numbers
Test #8:
score: 0
Accepted
time: 359ms
memory: 10704kb
input:
99993 41776 373 639243 58113 465084 232542 827156 4 881559 1999 669436 796 923004 102556 996700 2 815436 6 408708 34059 746068 37 691047 14103 805284 44738 669348 55779 33648 3 16656 3 842300 42115 947532 78961 479644 2 911052 227763 546644 2 917721 101969 679100 5 842644 210661 609536 9524 608436 6...
output:
868856375 879964879 530656140 389149523 165571351 183262880 55154005 869158047 418696654 941028297 952404912 159481955 314312983 773956412 764870520 7288415 756358722 168738678 724889254 519294470 997461263 474299437 720313171 797110017 82051142 618717910 404010211 329159214 755962512 381517952 5127...
result:
ok 99993 numbers
Test #9:
score: 0
Accepted
time: 425ms
memory: 10708kb
input:
99907 386400 193200 880440 5060 382200 12740 765600 15 678600 60 865800 96200 896280 6 323400 150 448800 8976 382200 735 926100 270 549780 51 990360 14 390600 11160 903000 2580 280800 288 660660 12 737880 3 504900 1350 966240 2745 964440 95 767340 145 823200 10290 969408 374 612000 12240 843480 180 ...
output:
839149693 772839462 738356188 626471692 396385998 446532107 27525558 240199881 569943092 936894468 344557792 818311725 668738375 253136603 734028075 236848410 738004858 217049341 992924481 516414732 92571486 323712222 253815516 447449769 643612006 525455045 509166761 614850725 223159507 720498563 76...
result:
ok 99907 numbers
Test #10:
score: 0
Accepted
time: 395ms
memory: 10744kb
input:
99909 964440 25380 888888 91 630630 9009 614880 2520 833280 2688 406980 19380 993300 165550 612612 18564 804960 8385 756756 468 849420 32670 812160 1080 321300 50 779688 12 349440 156 781440 352 984060 497 865260 45 830280 83028 669240 3432 639540 33 959040 36 911064 1276 871080 15 994500 5 455400 4...
output:
311290907 64430302 850596131 815898642 672885837 782823589 251765625 836326736 873345318 819067661 387602711 690386917 391301477 852740753 212676520 27049766 111744455 190520343 862142248 415181338 488882713 251578582 242640546 874283778 333132933 59954694 374723442 977441472 103634913 818556535 923...
result:
ok 99909 numbers
Test #11:
score: 0
Accepted
time: 376ms
memory: 10700kb
input:
100000 83353 2033 40010 20005 21035 4207 70998 3 89338 19 59402 4243 85709 13 58514 29257 20598 3433 85953 28651 84019 281 80255 2293 84382 1361 88537 3053 43304 5413 46958 53 50541 3 26751 37 69167 9881 24666 4111 33938 2 40190 4019 58833 19611 59555 11911 79114 39557 34618 38 30830 6166 74314 73 8...
output:
127447307 578348846 150274863 325719251 767339100 498770554 358342456 560224486 21086617 103206046 485930783 723154992 928571957 329774042 677413077 598102453 283251912 551693275 420558502 206008306 843038769 61830092 212506057 330470978 773124728 357366448 541057016 696351638 373457347 106341106 10...
result:
ok 100000 numbers
Test #12:
score: 0
Accepted
time: 382ms
memory: 10828kb
input:
99944 433440 258 683760 14 673920 624 966240 12 421200 240 405720 210 973728 1127 782460 130410 683760 1295 357906 130954 535920 267960 615600 8550 912600 152100 852600 1225 967200 312 816480 58320 930600 1034 534240 5088 994500 29250 745920 12 687456 4464 816816 116688 728640 165 738720 9 336600 26...
output:
678657997 598480097 849686679 982781403 931032722 887749833 791533498 813639615 135938269 808503532 143635924 964333115 268812156 834891786 451469486 771159701 11097791 372597024 455251013 200942658 486643503 122230261 276478820 791695224 752778485 235378910 572766452 583563872 434783402 116578376 2...
result:
ok 99944 numbers
Test #13:
score: 0
Accepted
time: 435ms
memory: 10824kb
input:
99946 744480 198 725760 20160 441000 350 995400 2844 462000 77000 544320 945 965580 308 485100 147 514800 300 512820 37 427680 1782 758520 840 425040 22 686400 275 913500 290 865260 9 981540 3420 911400 6200 742140 2945 820260 6615 725400 6045 918720 1584 794640 5160 988416 14976 725400 9672 677160 ...
output:
907501311 606468548 163315640 931841601 629967143 752859673 635668890 576436281 230679284 422073250 625082936 631286259 710924955 46109817 653893659 63923131 994309939 62095730 848968920 33866355 653121172 296055001 200577670 624637804 134129791 129305616 59606188 76556918 360375522 983861135 389768...
result:
ok 99946 numbers
Test #14:
score: 0
Accepted
time: 379ms
memory: 10828kb
input:
100000 71668 874 113688 4 86600 2165 110796 7 106788 44 113976 6 79156 5654 120472 74 70860 20 120024 20004 63441 63 99348 974 117396 58698 98865 507 69228 1282 123966 2 68502 42 73860 14772 117819 6201 79275 105 73689 24563 66044 316 108020 4 87932 26 60333 507 68684 446 128394 2038 115934 1274 790...
output:
832178394 104851798 467618688 644946002 657813471 108452680 192975517 291342387 503519761 784242136 611540040 217047796 839028898 566383901 845523500 206274495 910289984 834201380 719561570 485615813 698132807 289802422 683509615 140728878 325955020 720091597 336595122 957236095 740544915 289955287 ...
result:
ok 100000 numbers
Test #15:
score: 0
Accepted
time: 370ms
memory: 10664kb
input:
99889 376740 1365 880992 7728 406980 126 905520 1715 376992 153 704340 252 846300 28210 839160 140 821100 8050 716100 93 948480 390 974160 12177 323400 23100 635040 2835 662400 138 972000 4860 965580 64372 885360 17360 314160 1680 372960 63 879648 1232 550620 1035 926100 300 828000 2250 765072 54 88...
output:
94666771 441091051 373164849 255453062 230371783 836271657 892608994 977140584 485037066 38960653 894397276 470174227 304162897 920674902 303468621 817702334 158513078 655800549 875714524 72613809 840503188 630091848 474114110 825777340 553853297 15632177 838154587 101687233 141581225 135790756 4492...
result:
ok 99889 numbers
Test #16:
score: 0
Accepted
time: 407ms
memory: 10716kb
input:
99974 837760 220 316008 342 866250 125 998760 1148 271320 969 782040 98 998640 499320 280800 1404 408240 12 903000 5375 297000 11 965250 7150 977040 24 309120 20608 895860 2133 640640 4004 848400 150 666120 13 235620 8415 935424 21 782040 195510 399840 735 843600 38 286440 3080 985600 35 479808 147 ...
output:
807000059 665202029 891455140 721666886 632180451 488322166 124935531 121813485 778343021 319389912 638518472 22154525 686510387 120750659 864019205 470394452 305953397 22399240 735126587 113846500 545624092 169382166 295830527 799527050 356187220 373648999 406023952 426221824 604897062 206322664 94...
result:
ok 99974 numbers
Test #17:
score: 0
Accepted
time: 389ms
memory: 10864kb
input:
100000 760258 2 679199 419 617495 5 762709 821 773386 2 770794 385397 661767 3 729303 3 740291 577 722882 361441 657357 3 783899 29 730703 107 790337 29 640147 2311 571127 433 644663 8831 729583 31721 613174 2 734909 7 726973 55921 695038 2 717082 2 592145 118429 747913 9011 690715 138143 613159 103...
output:
173056977 260250351 191445321 79545923 941378115 537789563 488354234 324555222 213902991 633499857 296618000 345265214 628899335 49700192 391367032 86303252 645764743 950474957 377182690 275772571 735814070 890794505 251955471 18023375 141676294 589414274 247827859 197911834 670819777 977282153 5386...
result:
ok 100000 numbers
Test #18:
score: 0
Accepted
time: 392ms
memory: 10832kb
input:
100000 739424 56 732555 1095 755404 377702 720244 116 720495 144099 744264 6 779348 73 737737 91 722550 240850 739244 106 728260 4 727062 51933 761568 8 743598 1962 779808 259936 756639 9 737340 122890 746528 4552 718977 3 734432 367216 761860 3463 771550 65 735908 1684 741726 801 744108 6306 765500...
output:
519099458 118596861 168019594 526778396 117659958 655570058 48838506 610400258 882737834 302053977 587221762 316746820 864227210 122656701 371101755 958089757 654575859 386966601 940144094 363266788 571904121 320023113 918613580 779209072 550328079 713619764 145627668 749666085 140191675 630305484 9...
result:
ok 100000 numbers
Test #19:
score: 0
Accepted
time: 410ms
memory: 10764kb
input:
99912 855600 713 494208 27 437580 1870 689472 49248 190080 330 874368 54 394680 69 729960 264 577920 12040 960120 1143 446880 63840 856080 328 614040 122808 212520 644 991116 76 903000 129000 830280 1480 244800 14400 984984 3731 867888 98 410400 160 946080 3240 959040 540 376992 1632 853776 99 41412...
output:
590678689 559163520 452437064 478194554 559883857 897091141 327749346 968335004 769987164 357812637 446866528 640024007 764101869 170431089 287014052 989751108 992328843 467386949 186164432 565588756 11462856 298052584 208472823 820615312 251378611 79047815 235189694 524924815 214719791 157500668 40...
result:
ok 99912 numbers
Test #20:
score: 0
Accepted
time: 410ms
memory: 10748kb
input:
99909 792960 33040 719712 833 390600 24 774180 5610 376200 1980 788256 16 726180 3185 171360 288 505440 1440 763560 270 709800 27300 442260 31590 694980 2430 919800 252 491040 99 867240 7227 405720 207 998760 24 779688 5096 840420 116 676200 5880 820260 2790 471744 351 349440 64 294840 168 725400 27...
output:
43619765 502360775 87041787 322998123 810478146 590130246 492510189 429129692 173057783 950850150 563161616 424891391 873545717 834467333 942208233 360095179 597769357 171327697 800811773 408022328 646791879 9064092 571281475 130804650 721410181 468509294 721054969 108512331 48122136 961610689 76253...
result:
ok 99909 numbers
Test #21:
score: 0
Accepted
time: 396ms
memory: 10772kb
input:
99991 715680 1491 349440 91 455400 330 791700 2262 442260 4095 676200 92 601920 5016 405720 4140 356400 6600 138600 2772 191520 95760 851400 42570 864000 450 815100 836 444600 325 783360 3840 870240 21756 921060 1462 176400 144 827640 95 990000 15000 741312 3432 964320 1568 822528 102 550800 816 372...
output:
234067592 104350957 222309046 958348685 817307812 902076224 887938934 33644437 618708419 79274470 184423372 872628797 327726509 280961338 442559226 154436253 12351888 365805780 654018074 754717814 685887383 679270450 354555130 224895646 117797053 290941462 105429926 685132587 721231865 423695064 724...
result:
ok 99991 numbers
Test #22:
score: 0
Accepted
time: 385ms
memory: 10768kb
input:
99999 919483 163 999443 13691 986227 11 909862 454931 156393 9 957183 3 928437 309479 65603 289 108829 7 112652 56326 927493 132499 941417 14051 952671 3 116924 4 72724 2 89132 4 25268 6317 11133 3 903934 2 28004 4 885949 28579 903473 43 398987 155718 942551 241 168092 84046 956678 478339 949407 3 1...
output:
649681943 937369029 900617210 324589690 947454259 169654491 516267359 194998803 290828913 295165512 22374426 75771449 87571207 661975421 75943550 6361986 942021870 828326082 107092261 30229472 755637121 554913898 202561075 983720149 558959661 345000452 211877265 354925006 513124567 253502009 8456454...
result:
ok 99999 numbers
Test #23:
score: 0
Accepted
time: 411ms
memory: 10772kb
input:
99925 588000 600 240240 130 405720 15 633600 4400 799680 2940 912600 234 994560 448 912600 1800 632016 39501 791700 273 565488 231 716100 155 758160 648 777600 120 725400 25 477360 9180 879060 1380 534600 1782 885360 10540 425040 1680 396900 294 317520 189 692640 195 449820 9180 919800 20440 194040 ...
output:
714125282 134604800 379773481 806233239 937679654 368210574 631260798 297890766 338834970 185813223 260340287 130946991 207540087 408091187 174919041 266075415 701940485 495349982 50420446 489148352 756854395 59806405 409949732 24100205 617684304 558054379 530400732 597481964 732374782 41641019 2937...
result:
ok 99925 numbers
Test #24:
score: 0
Accepted
time: 401ms
memory: 10700kb
input:
99910 928800 900 878220 58548 549120 4 459360 3960 925344 11016 249480 2772 799680 4704 724500 36225 697680 2565 574200 47850 636480 26 414960 31920 429660 20 662400 26496 595980 9933 842688 693 807300 270 423360 2352 974610 3822 502320 14352 518700 3 180180 36036 897600 44 487200 1200 990990 33 468...
output:
225969216 824075620 855941011 350996180 523350720 347189942 665385420 497399220 296726180 585430719 555726778 292333934 558712129 574780691 215814582 589862129 377131917 689490266 705673217 973629209 493807442 83538441 670680129 142149652 51539725 663058348 527519086 261406513 588707102 519583604 48...
result:
ok 99910 numbers
Test #25:
score: 0
Accepted
time: 413ms
memory: 10764kb
input:
99994 665285 893 662515 23 677545 61595 635523 571 641688 320844 675615 9255 670728 223576 664573 6097 654010 65401 652610 65261 644162 6254 656782 43 664545 18987 678890 11705 632514 6 669624 55802 666752 2 666111 3 668744 2 635286 211762 670936 4 659982 2 682210 17 633462 2974 669795 223265 658610...
output:
484775585 18673308 2655372 464378350 551115643 920675032 271575016 41658384 941135300 430817576 988967210 547116857 675034420 740367422 350295745 820024673 718415155 527079157 605319323 364885395 733043627 996943615 404756186 442231961 457606133 18374815 360869722 877007650 854863790 606289824 84079...
result:
ok 99994 numbers
Test #26:
score: 0
Accepted
time: 400ms
memory: 10708kb
input:
100000 135220 67610 167814 9 141921 9 133929 44643 72550 7255 72814 98 111084 27771 119835 5 108476 94 116156 818 79255 605 112244 28061 138575 115 115572 19262 117916 82 104526 52263 167428 4 98975 19795 137604 34401 71776 8972 91916 22 124353 9 106828 3142 160844 2036 87392 16 139884 3 106068 2 75...
output:
30337543 508224288 996076657 767613458 265032294 402494722 35099173 427415150 552114027 905782328 464492456 621453406 30875094 729047040 48701944 319794971 779262761 82013676 747151859 807778894 22569024 171020592 991836034 822109644 348719513 426118986 374057660 531341958 646303580 532544751 277239...
result:
ok 100000 numbers
Test #27:
score: 0
Accepted
time: 393ms
memory: 10720kb
input:
99934 912000 192 827904 18816 852768 6048 768240 88 750720 24 426360 2090 336000 4200 865200 108150 154440 5720 776880 260 424320 6240 452088 84 138600 168 180180 924 981120 1344 525096 1989 749952 186 900144 1128 627480 135 742500 6 930384 546 984984 616 945360 236340 827820 27 359040 89760 594048 ...
output:
467181757 293530027 801754889 131352590 219926372 361928038 413337293 161734669 461062662 834665463 933769841 511009726 497015551 154824134 108512331 459920983 330069463 827857968 714669018 666498564 842817815 74356185 769985349 1036781 810677462 502750340 103854485 510195866 645386411 751267294 760...
result:
ok 99934 numbers
Test #28:
score: 0
Accepted
time: 386ms
memory: 10780kb
input:
99912 594048 663 763200 954 938448 294 695640 20 761400 324 808920 5 999936 499968 485760 1380 870870 957 834480 7320 778320 3384 855036 81 138600 792 319200 300 994840 770 727272 1512 812160 6 722568 30107 316008 6 551040 3 382536 44 814800 15 992880 3152 957000 1160 805392 15792 877200 1275 722304...
output:
370217145 480493222 566912278 991715223 663296437 573694981 514304097 580887598 30364282 50677264 904196789 945323556 710364450 167380068 261960550 360172731 752116790 484869331 405177086 729145243 719566473 788949947 671137122 497616777 300821929 475734376 334339856 17096048 224194152 839621290 198...
result:
ok 99912 numbers
Test #29:
score: 0
Accepted
time: 402ms
memory: 10824kb
input:
100000 798311 19471 667078 333539 751861 11 581881 1871 677797 2909 722289 3 782999 111857 599905 5 728609 7 696703 99529 578651 43 667789 9967 667978 2 727863 3 775403 25013 656245 5 606982 303491 598409 85487 631973 1213 692255 138451 795085 159017 707695 141539 610321 367 580791 193597 690977 987...
output:
444814549 479887726 161368155 713671539 512429309 217463452 940473489 691634801 341185520 789628129 126904322 128247267 78020988 147272174 140055928 58284594 567609810 830945190 329556335 334082611 257405385 686616764 477089594 990186401 625937561 744851426 278668138 742577739 7477013 902344240 6317...
result:
ok 100000 numbers
Test #30:
score: 0
Accepted
time: 393ms
memory: 10768kb
input:
100000 245267 2027 491108 245554 294653 12811 524036 4 464668 4 641825 25673 605804 151451 452324 226162 349012 174506 336484 84121 601316 4 252452 126226 391388 195694 650908 2 668041 11 297419 4189 242631 26959 514252 128563 783548 391774 499367 121 773308 2 277609 769 446427 148809 461996 4 55754...
output:
991427908 625814820 450216414 511541556 99338430 909455051 899466724 629466755 534105290 316255786 40210120 159125429 529356084 557981757 549262098 745955543 923603989 649884505 526143626 889895776 347412922 358176007 483809079 582819725 195095778 576883500 476529998 264400530 171399884 973762714 35...
result:
ok 100000 numbers
Test #31:
score: 0
Accepted
time: 411ms
memory: 10700kb
input:
100000 857970 47665 854140 85414 868076 4796 47940 31260 846156 211539 828988 146 873621 41601 885717 2481 840875 35 849321 9 876940 1345 871868 217967 834132 417066 887202 147867 885732 9524 877116 57 879452 4 856076 202 846188 329 827948 1364 879670 5 858372 429186 887655 51 845342 94 850545 2305 ...
output:
310784193 577142831 860061102 418016931 799622920 194617293 600170360 301950507 159709479 789073730 62868233 367477454 858468872 230444924 46165522 184071442 218745190 279809641 301342784 559275707 410411796 386225661 796374966 70294712 775205349 393055006 321369012 717122763 433998985 648703979 502...
result:
ok 100000 numbers
Test #32:
score: 0
Accepted
time: 410ms
memory: 10748kb
input:
99952 789480 270 845880 281960 920040 1496 808920 840 845208 211302 120960 56 644490 462 487080 440 411264 7 980100 245025 396000 80 792120 56580 310464 9 516600 200 323400 1617 954408 34086 607200 5060 456960 40 346500 12 205920 1287 441000 21 513240 2730 497952 4788 568260 410 525096 234 530400 40...
output:
200580822 608955263 2891775 642715557 52232639 971082955 444736221 834720291 61851770 671102077 614486597 52901788 196978773 438043529 619730385 817417195 500892931 678962631 354969970 620904430 899299313 157836370 724722364 326431080 883101215 729656805 600115918 344220036 249645325 367052589 43362...
result:
ok 99952 numbers
Test #33:
score: 0
Accepted
time: 411ms
memory: 10760kb
input:
100000 444647 7 568949 37 615523 109 668107 60737 670309 41 590287 277 457147 17 645217 41 613403 87629 662741 2131 480215 5 455383 47 555326 2 630579 3 483647 283 583195 5 614137 32323 674763 3 630166 2 677899 8581 593611 277 489079 19 597026 298513 449317 40847 460669 11 529154 264577 668831 39343...
output:
34404405 657184393 222735298 580311620 758503693 98456637 379897917 401307479 27074352 442922428 724907679 493520423 996762851 987019630 392986368 477414529 621217932 912038993 778586207 481963959 173565002 713424146 582684058 276493728 518302017 263095912 807535134 855397920 844163385 619758540 628...
result:
ok 100000 numbers
Test #34:
score: 0
Accepted
time: 370ms
memory: 10868kb
input:
99999 55988 27994 941217 3 928963 7 219916 109958 144775 5791 149697 9 867 289 8396 4 892 446 916599 305533 976881 3 167876 41969 5284 1321 965099 23539 160652 80326 957311 30881 94617 31539 99508 4 935695 187139 59193 3 194949 9 891057 297019 946677 3 932915 186583 990895 198179 161996 4 883947 294...
output:
939996621 21971647 396106671 576681409 716928493 569928322 851877895 71497044 966898633 292036267 533869137 324286588 159533779 895155660 430366569 828778796 266427410 857504911 589961235 421716466 894252423 710789371 996100796 673759185 262015247 68386205 36252349 865049946 58005263 573245566 95312...
result:
ok 99999 numbers
Test #35:
score: 0
Accepted
time: 424ms
memory: 10720kb
input:
99891 828000 20 312480 4960 504504 308 684000 3800 802620 245 812700 70 973728 60858 669900 6380 205920 22 921060 131580 959040 191808 793440 2088 355680 1170 975240 252 821100 2300 895440 156 616896 2268 749700 30 996840 195 681120 55 879840 21996 451440 80 975744 2541 990000 10 881280 220320 60606...
output:
105200257 746609667 940687646 731022520 591362169 919621116 793331100 559879728 569085105 694808929 98402907 116203833 303100319 458794209 591537026 310963694 720134754 130726068 235496530 599503695 951165870 689229056 210152343 391610874 653491076 489078963 754499563 303286988 779129187 159679761 5...
result:
ok 99891 numbers
Test #36:
score: 0
Accepted
time: 391ms
memory: 10748kb
input:
99912 626400 116 699720 174930 896280 5432 965250 585 649152 64 353430 99 516600 36900 766920 462 729960 22120 591192 8694 980100 3 880440 36685 994840 2 510840 56760 931770 7830 908040 1932 335160 2940 981360 10440 299880 35 839040 13984 727272 296 606060 140 838656 119808 796824 44268 931770 153 9...
output:
405977154 992794593 185763036 358156839 538753333 803948738 604392111 320581269 659153328 945974173 187667139 107236198 641736112 140736661 802626762 595949751 827135594 975502690 273363332 96527462 58971061 212389494 494108651 21934607 331933105 591825545 307078504 376496951 582055083 367582296 673...
result:
ok 99912 numbers
Test #37:
score: 0
Accepted
time: 401ms
memory: 10712kb
input:
99994 817496 408748 850434 10903 845546 221 827814 3 811136 4 801658 72878 806230 80623 828530 58 834326 463 811226 19786 830373 129 833630 35 819160 20479 811336 10964 811128 67594 834730 65 812318 5174 805656 402828 827655 15 844206 6 809736 101217 848310 6 851462 634 843557 13 807562 7 834717 214...
output:
283196748 402768545 617271756 647705490 204121513 770756878 812830825 509064251 382583109 801678420 741695817 717920009 745708206 528846662 869050387 252554719 880433194 291512125 588729177 677302592 715322152 835554063 76631746 841422115 253894528 969871255 847405574 487130410 898447556 15123704 72...
result:
ok 99994 numbers
Test #38:
score: 0
Accepted
time: 368ms
memory: 10828kb
input:
100000 414246 7 448316 886 438930 219465 419420 5 460850 5 424564 1652 448600 25 463203 154401 433212 2777 426646 4961 419418 81 451052 89 436192 218096 453728 14179 458916 1374 422812 13 471345 7035 467020 1229 454590 5051 413036 52 444105 9 434076 244 457460 5 470214 2 424316 74 427975 25 451236 1...
output:
884076375 953940855 825409661 596851891 568049291 270082663 318918098 640897030 98214317 153412236 215757964 468374311 686863082 729599012 39078490 337090336 718190467 406002442 849172723 774653618 90527384 264523807 488926047 761813599 310847766 138816202 106450602 649950083 323664991 937399937 264...
result:
ok 100000 numbers
Test #39:
score: 0
Accepted
time: 417ms
memory: 10704kb
input:
99916 494208 1056 551040 287 729960 1155 656370 72930 722304 38016 707940 7452 909090 999 806520 120 822360 89 341880 20 741000 8 861000 215250 143640 342 714240 3720 171360 68 986544 408 715176 357588 750750 150150 219240 189 624000 624 844272 468 578760 2226 936320 418 730620 2970 963072 1536 6912...
output:
102679097 916917380 659131339 705831012 992995867 210705051 626709524 325293268 603899295 164990817 548504411 350762928 832401036 537151121 567517112 679293125 4192378 692662056 686594794 676548889 13425990 166285626 739206527 915895755 208155408 407839333 900038996 113757374 672953308 135165104 884...
result:
ok 99916 numbers
Test #40:
score: 0
Accepted
time: 406ms
memory: 10760kb
input:
100000 413219 17 396115 79223 419529 11 402467 373 419026 38 423843 7 398823 132941 414127 469 437621 19027 427757 38887 397486 46 435489 3 422465 4447 396362 59 433042 10562 413458 206729 440366 1046 382838 67 408929 29 442766 4138 375834 3 429033 13001 391353 1787 422842 2 379127 1321 439528 21976...
output:
296856896 885938366 786396199 958228624 283433919 388402969 592600498 601132444 647637377 13591263 781845085 645327094 357682242 404205614 416073005 738415326 824115992 829576210 234105507 388847164 337499744 319367350 567041743 355250038 362277526 531741109 72166460 677754870 949309911 807836182 12...
result:
ok 100000 numbers
Test #41:
score: 0
Accepted
time: 382ms
memory: 10776kb
input:
99895 626400 40 899640 136 612000 450 764400 1820 421200 702 567840 16 430342 350721 904176 312 705600 180 542640 4760 880992 2208 535920 14 352800 420 635040 70560 953568 344 948480 20 462000 1232 645840 2760 542880 60 926100 25725 564480 20160 924000 3000 649440 5 826560 9184 628992 3744 779520 18...
output:
692046628 725813950 711448731 635045389 902992517 476164809 937590474 747462972 276745059 195476291 944819454 738614101 807430438 624180078 826822782 778022715 599237390 140697115 734079496 894577370 606549560 898732790 816608626 86972337 483376733 968817471 463742026 787562409 521934572 555742856 7...
result:
ok 99895 numbers