QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#514659 | #9171. Sum of Squares | ucup-team1878# | AC ✓ | 230ms | 7140kb | C++23 | 8.6kb | 2024-08-11 05:31:24 | 2024-08-11 05:31:24 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3552kb
input:
2 0 1 2 3
output:
1
result:
ok 1 number(s): "1"
Test #2:
score: 0
Accepted
time: 0ms
memory: 3536kb
input:
2 1 1 2 3
output:
14
result:
ok 1 number(s): "14"
Test #3:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
2 2 1 2 3
output:
264
result:
ok 1 number(s): "264"
Test #4:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
3 3 605230315 428810527 776385874 745333295
output:
15839337
result:
ok 1 number(s): "15839337"
Test #5:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
5 7 902640013 351550726 731487451 456710612 252676894 412331558
output:
322961218
result:
ok 1 number(s): "322961218"
Test #6:
score: 0
Accepted
time: 0ms
memory: 3492kb
input:
7 5 183852812 663616758 220872066 605911828 401954201 601338146 659262550 65781051
output:
826813955
result:
ok 1 number(s): "826813955"
Test #7:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
10 10 478598538 179353359 135928340 820981644 424526187 510398057 206993942 677107741 145844667 140118213 951816542
output:
301977331
result:
ok 1 number(s): "301977331"
Test #8:
score: 0
Accepted
time: 5ms
memory: 3724kb
input:
100 100 967408874 565143583 960242626 374923677 448455063 764414353 401705535 273785053 719323207 224148823 392092913 415513298 287563966 518320038 151291981 832118123 338460195 135194301 489144805 744403492 294693664 267047570 205732573 177541499 491078407 850097951 949311945 418105489 998150915 48...
output:
769694226
result:
ok 1 number(s): "769694226"
Test #9:
score: 0
Accepted
time: 180ms
memory: 6996kb
input:
500 1000000000 180584383 105133606 255064426 113102317 389576139 801018021 454368691 811754643 881588355 948023365 670210376 101997418 781152322 54707753 556657493 533343161 309401877 183442302 506248052 845919726 955410654 267588455 415394216 101627374 932959386 141108743 817617361 717939772 537920...
output:
74882296
result:
ok 1 number(s): "74882296"
Test #10:
score: 0
Accepted
time: 0ms
memory: 3544kb
input:
0 0 4
output:
1
result:
ok 1 number(s): "1"
Test #11:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
0 1 2
output:
4
result:
ok 1 number(s): "4"
Test #12:
score: 0
Accepted
time: 0ms
memory: 3556kb
input:
0 2 9
output:
13122
result:
ok 1 number(s): "13122"
Test #13:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
0 3 10
output:
6000000
result:
ok 1 number(s): "6000000"
Test #14:
score: 0
Accepted
time: 0ms
memory: 3540kb
input:
0 4 6
output:
40310784
result:
ok 1 number(s): "40310784"
Test #15:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
1 0 5 7
output:
1
result:
ok 1 number(s): "1"
Test #16:
score: 0
Accepted
time: 0ms
memory: 3568kb
input:
1 1 10 1
output:
101
result:
ok 1 number(s): "101"
Test #17:
score: 0
Accepted
time: 0ms
memory: 3604kb
input:
1 2 10 10
output:
60000
result:
ok 1 number(s): "60000"
Test #18:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
1 3 4 8
output:
2088960
result:
ok 1 number(s): "2088960"
Test #19:
score: 0
Accepted
time: 0ms
memory: 3796kb
input:
1 4 9 3
output:
162241777
result:
ok 1 number(s): "162241777"
Test #20:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
2 0 6 2 8
output:
1
result:
ok 1 number(s): "1"
Test #21:
score: 0
Accepted
time: 0ms
memory: 3832kb
input:
2 1 2 1 8
output:
69
result:
ok 1 number(s): "69"
Test #22:
score: 0
Accepted
time: 0ms
memory: 3532kb
input:
2 2 4 6 8
output:
16544
result:
ok 1 number(s): "16544"
Test #23:
score: 0
Accepted
time: 0ms
memory: 3824kb
input:
2 3 8 8 3
output:
4453782
result:
ok 1 number(s): "4453782"
Test #24:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
2 4 4 2 7
output:
290862072
result:
ok 1 number(s): "290862072"
Test #25:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
3 0 1 5 6 7
output:
1
result:
ok 1 number(s): "1"
Test #26:
score: 0
Accepted
time: 0ms
memory: 3492kb
input:
3 1 7 5 4 2
output:
94
result:
ok 1 number(s): "94"
Test #27:
score: 0
Accepted
time: 0ms
memory: 3544kb
input:
3 2 6 4 1 7
output:
18358
result:
ok 1 number(s): "18358"
Test #28:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
3 3 2 7 5 7
output:
3880080
result:
ok 1 number(s): "3880080"
Test #29:
score: 0
Accepted
time: 1ms
memory: 3544kb
input:
3 4 9 4 7 5
output:
331070429
result:
ok 1 number(s): "331070429"
Test #30:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
4 0 6 5 1 5 2
output:
1
result:
ok 1 number(s): "1"
Test #31:
score: 0
Accepted
time: 0ms
memory: 3820kb
input:
4 1 5 8 5 4 4
output:
146
result:
ok 1 number(s): "146"
Test #32:
score: 0
Accepted
time: 0ms
memory: 3540kb
input:
4 2 10 5 2 8 9
output:
106344
result:
ok 1 number(s): "106344"
Test #33:
score: 0
Accepted
time: 0ms
memory: 3536kb
input:
4 3 7 4 10 5 8
output:
29115072
result:
ok 1 number(s): "29115072"
Test #34:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
4 4 10 5 8 10 4
output:
500273261
result:
ok 1 number(s): "500273261"
Test #35:
score: 0
Accepted
time: 10ms
memory: 3536kb
input:
0 2000000 887967041
output:
500071675
result:
ok 1 number(s): "500071675"
Test #36:
score: 0
Accepted
time: 10ms
memory: 3764kb
input:
0 1999999 625641315
output:
308282266
result:
ok 1 number(s): "308282266"
Test #37:
score: 0
Accepted
time: 10ms
memory: 3792kb
input:
0 1999998 906412107
output:
871373604
result:
ok 1 number(s): "871373604"
Test #38:
score: 0
Accepted
time: 11ms
memory: 3960kb
input:
100 2000000 652244043 300656450 459422947 823924365 480745784 828721243 285195870 510165215 724794073 204002826 10630356 630052686 237272639 540425502 580366236 240195354 447352415 174629782 272627755 454371253 690270356 484869695 106758358 75669318 328819839 856980856 419245417 688017831 715171524 ...
output:
918612799
result:
ok 1 number(s): "918612799"
Test #39:
score: 0
Accepted
time: 15ms
memory: 3656kb
input:
100 1999999 640138185 313964405 924013746 973186539 81779797 601366593 417854882 158531114 294656143 781047513 833209426 710475764 308307945 589786202 495715779 333189724 158418504 12022311 28035665 646065074 798000914 58410105 704758133 970036808 33217251 591838998 980481906 117778034 146793346 184...
output:
13685750
result:
ok 1 number(s): "13685750"
Test #40:
score: 0
Accepted
time: 15ms
memory: 3796kb
input:
100 1999998 46847138 332337489 997612969 437654586 846197560 423893752 704936375 958177240 93661446 332376163 42029840 788036055 138013825 224943161 730837622 332233153 39926694 964979788 12107303 986220283 695783920 914903232 278629999 41184271 433128457 911803294 900828046 707145986 582245318 6871...
output:
451948161
result:
ok 1 number(s): "451948161"
Test #41:
score: 0
Accepted
time: 32ms
memory: 3984kb
input:
200 2000000 212007596 295635161 142203436 643576376 810930139 577595098 504250019 264874422 806192094 178177288 604464242 204290876 1333667 585344957 908219647 747607902 610209395 265745963 443608087 773728087 373790341 713870968 375819350 197436534 305816945 707592351 146787452 6424178 371001702 18...
output:
132060246
result:
ok 1 number(s): "132060246"
Test #42:
score: 0
Accepted
time: 33ms
memory: 3840kb
input:
200 1999999 621124862 43542798 619022017 645705217 217732878 674820104 319928848 112926918 498149566 395335851 563969196 874306639 748220096 313143783 906805608 532708979 746531101 726425678 592362526 393528134 857933203 488763488 842726119 143201610 990450490 811671450 609610064 447111074 538310016...
output:
596130269
result:
ok 1 number(s): "596130269"
Test #43:
score: 0
Accepted
time: 32ms
memory: 3828kb
input:
200 1999998 384694075 822860419 598363313 349297194 573858322 363086212 19509385 209060732 141422913 910439026 666946269 368976431 716503459 15118800 464392049 258371003 909545349 812949772 518387422 131583603 79537305 360798939 809653079 655808462 656427440 169335416 389287102 942960917 135969808 6...
output:
248403045
result:
ok 1 number(s): "248403045"
Test #44:
score: 0
Accepted
time: 62ms
memory: 4636kb
input:
300 2000000 31581567 293771406 163867795 539324697 728662237 876366179 636941527 241286997 902359194 607069118 584784899 915944070 310077193 689966336 618318777 928034598 309369476 805399100 732158364 193764248 846407516 341013378 228284598 407707107 896518693 937745713 139004853 492434368 978150214...
output:
961737404
result:
ok 1 number(s): "961737404"
Test #45:
score: 0
Accepted
time: 63ms
memory: 4604kb
input:
300 1999999 214605972 801862061 98051256 739940248 94862932 601776436 397703595 903234228 518184158 301014734 493626498 903803240 766202317 274092934 59617175 29541652 448365049 721091638 279272883 664416393 658151150 795111103 234572405 235990571 401752935 999892053 564622379 581152359 190201315 14...
output:
373017751
result:
ok 1 number(s): "373017751"
Test #46:
score: 0
Accepted
time: 66ms
memory: 4668kb
input:
300 1999998 605373797 443297904 881993894 706381827 920927494 22478272 73242718 36762825 609495014 785153614 617591156 501342610 315093404 437547217 535553120 851665173 317180583 378547141 162593369 617975130 742480535 370115174 846191327 844481851 98008628 608941695 148569884 937741857 514585686 48...
output:
305915105
result:
ok 1 number(s): "305915105"
Test #47:
score: 0
Accepted
time: 119ms
memory: 5704kb
input:
400 2000000 953517597 482017492 908801752 658079951 479142685 103006984 719456077 858528683 539829960 328414091 952998866 703765334 448818622 842083254 10565951 268182479 684793307 820156582 115033443 299199309 493280128 638577235 461308703 554722969 757499988 206046558 561805904 139395690 585519112...
output:
994128390
result:
ok 1 number(s): "994128390"
Test #48:
score: 0
Accepted
time: 114ms
memory: 5724kb
input:
400 1999999 391406878 888391982 236062947 126090069 747557158 457732840 974394578 52397341 19305263 440413565 621818673 350036181 133801119 236864047 372131311 457290043 976645964 767987803 834307863 682800317 543657678 372507219 716191367 97125111 439363545 81096320 653662628 269704367 355585158 29...
output:
804224848
result:
ok 1 number(s): "804224848"
Test #49:
score: 0
Accepted
time: 118ms
memory: 5724kb
input:
400 1999998 30827190 759938112 920847106 453810486 230775163 861240140 994755912 601408910 427514965 980901710 422693109 578503753 154546599 512987457 50124887 462873176 33341089 145671140 289605012 599793529 991457156 814680165 641360601 987673806 289629499 736173843 788602069 886017012 676631372 7...
output:
893260590
result:
ok 1 number(s): "893260590"
Test #50:
score: 0
Accepted
time: 193ms
memory: 7008kb
input:
500 2000000 76007804 163512867 359939676 150297222 544598025 788575929 923912933 930541935 599003474 508531056 756901643 579984715 489791794 649248583 900238805 47885005 522995436 113841062 396203747 513129048 328471078 140665305 864398786 237261435 901868324 562999951 214036783 857263304 989091417 ...
output:
248399719
result:
ok 1 number(s): "248399719"
Test #51:
score: 0
Accepted
time: 193ms
memory: 7072kb
input:
500 1999999 200343912 66916153 464421161 291028556 467823625 103995033 60911300 512206355 440782388 929087689 496883601 298088393 811210089 411596238 814952015 818093567 241632207 43861188 152606201 227726314 720148314 832833147 585401312 117071983 625475714 371619180 891256458 180814902 530645808 7...
output:
587968914
result:
ok 1 number(s): "587968914"
Test #52:
score: 0
Accepted
time: 193ms
memory: 7024kb
input:
500 1999998 50780233 929550470 480043653 703362844 954919853 529199646 59419850 592123685 872425375 902543918 383658195 159271652 658567156 220756243 735061634 303318993 809708327 634214585 882932336 972890934 332713517 540589737 782991328 146438056 423896059 181323128 16715426 882321333 925099265 4...
output:
694956269
result:
ok 1 number(s): "694956269"
Test #53:
score: 0
Accepted
time: 0ms
memory: 3764kb
input:
0 1000000000 311621480
output:
11702304
result:
ok 1 number(s): "11702304"
Test #54:
score: 0
Accepted
time: 47ms
memory: 3544kb
input:
0 999999999 108452264
output:
635397798
result:
ok 1 number(s): "635397798"
Test #55:
score: 0
Accepted
time: 47ms
memory: 3564kb
input:
0 999999998 228621730
output:
705041270
result:
ok 1 number(s): "705041270"
Test #56:
score: 0
Accepted
time: 6ms
memory: 3724kb
input:
100 1000000000 492935057 257710427 680778187 39374725 220956129 149356684 838936857 237228920 460651101 14915932 281581196 546327551 891296341 578540917 257819753 952356649 464523258 475942265 855600624 501203769 866723686 956420344 653224523 350671740 193934341 737912260 157584419 514316162 5731646...
output:
339050999
result:
ok 1 number(s): "339050999"
Test #57:
score: 0
Accepted
time: 52ms
memory: 3964kb
input:
100 999999999 544094734 291917484 469791396 580257678 823860345 15916749 558080043 687299821 243223699 597552322 404865629 536734172 872426104 896831604 428712028 314668309 779269846 626848827 84712476 890104782 873078689 952517998 46894122 807990056 298905377 433220374 384542376 809940702 82404331 ...
output:
874557679
result:
ok 1 number(s): "874557679"
Test #58:
score: 0
Accepted
time: 52ms
memory: 3720kb
input:
100 999999998 266450121 654833952 927733213 449673875 289803955 440161885 662783473 226679088 674809344 711412935 122623312 631996602 957516496 890264982 873356745 462841964 63233576 798223773 409016342 788148513 957508078 119798286 123895041 232644001 891519274 506929176 157840759 297102899 4056823...
output:
69155441
result:
ok 1 number(s): "69155441"
Test #59:
score: 0
Accepted
time: 23ms
memory: 3828kb
input:
200 1000000000 524092627 645741314 275637709 537355768 115292659 230163979 770823846 572664330 459695543 831954450 270199112 499662140 151026967 476326263 548969480 644045524 434955185 716188332 241611360 955843231 771765354 826553186 578976600 235562568 341702851 680829929 303802159 69381658 169285...
output:
717921876
result:
ok 1 number(s): "717921876"
Test #60:
score: 0
Accepted
time: 70ms
memory: 3844kb
input:
200 999999999 656675002 501521015 460481992 547107989 750620191 261408163 630046758 820540819 592847076 288347597 855238504 773584325 697553222 157865728 259979484 227578011 91192240 14977315 142430366 631420778 288000543 970627342 218534151 147633799 620941580 146904461 832558115 252731400 57891972...
output:
960796054
result:
ok 1 number(s): "960796054"
Test #61:
score: 0
Accepted
time: 70ms
memory: 3832kb
input:
200 999999998 642790475 110186996 133676965 966998989 271578106 92029364 117224210 285730362 391439577 474593315 394189845 623192277 695579511 502670747 627764650 212948873 106773696 772768360 545215315 753070335 975638067 369964530 602979252 95200201 647604071 440247918 592803672 95332946 16411646 ...
output:
188158785
result:
ok 1 number(s): "188158785"
Test #62:
score: 0
Accepted
time: 57ms
memory: 4772kb
input:
300 1000000000 734260944 306246727 764486701 296212353 682237723 995426530 484985869 919411722 19081296 425060639 679557692 229668379 370315093 453252906 409487439 383346310 304432743 706524933 456058787 261585078 888251457 726586848 720010610 433565811 778508673 751679600 496382058 474420982 254876...
output:
539948432
result:
ok 1 number(s): "539948432"
Test #63:
score: 0
Accepted
time: 96ms
memory: 4688kb
input:
300 999999999 163591195 226401459 461664893 68605154 8032710 538873399 362170678 498596870 84631383 811007712 778353922 948568053 648829924 867649148 774741508 894864745 314463178 187358096 294906771 469817999 58187403 99740336 818280034 424230527 403939312 732856257 143104614 533772453 502389656 60...
output:
790807326
result:
ok 1 number(s): "790807326"
Test #64:
score: 0
Accepted
time: 100ms
memory: 4620kb
input:
300 999999998 725196183 987351450 111490673 348248452 492860070 225905828 448604056 187539200 220794556 19032720 945804604 895441786 818024733 820679697 973161829 334381470 132862750 735692811 600826300 659295751 379697035 81394926 85947117 377425408 853264223 333609829 227213251 133327334 480135951...
output:
616517336
result:
ok 1 number(s): "616517336"
Test #65:
score: 0
Accepted
time: 109ms
memory: 5824kb
input:
400 1000000000 699349488 901080966 525725019 91296392 227498323 730669406 346688822 338473442 983106081 440710101 415935344 479271814 785478981 744303421 152769494 982430561 580202091 848437099 907758608 887224582 666420646 965863640 531895959 739679690 531426338 983535551 222366168 888491640 342355...
output:
590643319
result:
ok 1 number(s): "590643319"
Test #66:
score: 0
Accepted
time: 155ms
memory: 5692kb
input:
400 999999999 852063106 647819092 340473952 755084450 528991282 345322080 985135270 819188408 428150162 116372345 471094606 288623858 424712000 632459737 725666639 406393787 828575258 82640532 304138925 465797581 673227447 740297388 835410095 565582923 955384912 861790477 914955604 235310970 1939390...
output:
509071194
result:
ok 1 number(s): "509071194"
Test #67:
score: 0
Accepted
time: 152ms
memory: 5796kb
input:
400 999999998 859913705 81640745 72417467 98785977 666364271 455118034 74904251 53952978 255764447 599990853 341110604 947169127 677805190 203320811 234816374 728718528 139718832 647313684 645188683 188030227 669061557 534127958 781932037 520744563 275465992 367641259 615063488 850187260 70291682 66...
output:
209716398
result:
ok 1 number(s): "209716398"
Test #68:
score: 0
Accepted
time: 183ms
memory: 6996kb
input:
500 1000000000 392691610 898102008 410408496 156312336 732757354 650502207 35357922 823735497 645205984 433911618 359879510 182893861 692620300 433715221 907998367 36505938 83759760 229699751 850323869 587374647 599934606 832160422 197076744 954829079 301793305 313644752 360220708 999382863 53078968...
output:
985081065
result:
ok 1 number(s): "985081065"
Test #69:
score: 0
Accepted
time: 230ms
memory: 7076kb
input:
500 999999999 155511989 610258726 247630531 572577789 19284615 551260183 751432038 138697440 517529075 585395769 818100889 546205598 904645852 43760804 538840351 296684454 94447542 692932728 233528154 680019068 279253560 482704000 537841628 547604220 57213954 688394713 255581028 275103629 107129280 ...
output:
414968765
result:
ok 1 number(s): "414968765"
Test #70:
score: 0
Accepted
time: 230ms
memory: 6980kb
input:
500 999999998 34876257 546412764 531795634 656982300 652101957 27749422 757986297 248159840 589467494 954144909 821569625 164094685 325510470 670702659 117823578 872298068 605079810 858048149 999717344 963654220 285638082 893242797 302091693 174563169 830165497 247802012 705087584 183439449 53243235...
output:
700122069
result:
ok 1 number(s): "700122069"
Test #71:
score: 0
Accepted
time: 15ms
memory: 3700kb
input:
99 2000000 178117415 854174627 843228539 140736411 683334257 103685793 161328335 666876515 42158641 557226485 374965815 291124264 237634959 631679974 682821544 381442333 779249223 744455261 844618464 884669960 394216466 273033289 482333302 718803035 215511860 598722198 948601373 87824359 914606131 5...
output:
981310753
result:
ok 1 number(s): "981310753"
Test #72:
score: 0
Accepted
time: 15ms
memory: 3700kb
input:
99 1999999 308617272 793111085 475559663 635250193 291469069 433348265 245924072 626386353 149773413 560104075 432225723 566503421 359429535 363376200 796633343 932948296 437499979 379507031 988858394 377973169 771610167 395291373 876587113 871786855 106908002 730526232 889070304 759431609 894536746...
output:
971328132
result:
ok 1 number(s): "971328132"
Test #73:
score: 0
Accepted
time: 15ms
memory: 3660kb
input:
99 1999998 589121565 754597943 424558663 873904313 285688763 832330725 404326033 377069648 596231447 367721730 751673575 367161739 95118626 456722739 446721534 461643180 593666254 116113736 174478187 470238290 822977705 213501911 523742594 466083850 212615518 634383980 915683806 594163219 600905305 ...
output:
729038862
result:
ok 1 number(s): "729038862"
Test #74:
score: 0
Accepted
time: 32ms
memory: 3968kb
input:
198 2000000 482362984 915524402 462932413 933659397 716183751 784528342 160332955 662489533 516650543 858135657 482921714 391092827 331886728 794267768 917237426 270434803 705285829 436756600 493700996 589416431 470534853 486283368 864852799 575169562 908926863 873769635 177599433 102072997 80652340...
output:
676915059
result:
ok 1 number(s): "676915059"
Test #75:
score: 0
Accepted
time: 28ms
memory: 3852kb
input:
198 1999999 899840126 434655349 951344972 612987998 565232627 951459023 733897566 887277503 758566290 49241066 357988324 129899462 491154332 708807827 700280410 629163205 645322636 846160176 15442059 990891383 304684083 618872151 72307844 705385829 369756335 946383115 89999423 940557448 857590372 32...
output:
218035
result:
ok 1 number(s): "218035"
Test #76:
score: 0
Accepted
time: 32ms
memory: 3840kb
input:
198 1999998 834160148 792609921 42042331 121976023 776065835 421700478 453241253 244226396 600797047 840676534 873025390 3784341 564559641 81580107 162179698 250971114 619132269 747013441 315580349 939676253 428714946 379903060 549439599 187493063 197285887 656747107 827813159 432587862 806664388 89...
output:
816995814
result:
ok 1 number(s): "816995814"
Test #77:
score: 0
Accepted
time: 65ms
memory: 4692kb
input:
297 2000000 282040500 494141360 752574360 554335885 365580753 266015739 483096219 287062360 764174919 621102075 95261246 309437872 346501622 838741053 326424739 209565525 707519226 78968980 40107980 216065864 491354365 141776106 119724227 221301492 865328920 36463293 231702167 613530630 19625075 718...
output:
833779948
result:
ok 1 number(s): "833779948"
Test #78:
score: 0
Accepted
time: 65ms
memory: 4700kb
input:
297 1999999 829386734 989580478 657755017 201947498 968928535 113797122 15231479 130682683 581316597 724522167 959910132 515591675 676970741 102205729 773691261 171768673 746028514 313057938 150605511 854775700 122267280 250928678 859841048 702390748 110400861 135084906 329966799 796095113 568388497...
output:
461828738
result:
ok 1 number(s): "461828738"
Test #79:
score: 0
Accepted
time: 65ms
memory: 4620kb
input:
297 1999998 738129644 574876840 267737793 151550079 983468128 918253885 195439629 597853245 16991079 144658367 909324235 273708446 3437470 42136353 620633091 295099760 932756632 218166631 29024337 144844813 308403180 141320884 452929643 363406882 651780333 649110828 217533672 508623077 703756832 722...
output:
277399170
result:
ok 1 number(s): "277399170"
Test #80:
score: 0
Accepted
time: 116ms
memory: 5696kb
input:
396 2000000 709246244 141843419 182987982 428596011 840101798 679443348 677433747 286814353 52404114 546254725 109631888 531528893 672632098 782154420 976527896 330713119 646543598 16063433 886520309 218169765 175580115 680248805 393495566 227888112 571307836 436648043 780586171 57596573 838530609 9...
output:
736870298
result:
ok 1 number(s): "736870298"
Test #81:
score: 0
Accepted
time: 112ms
memory: 5656kb
input:
396 1999999 829501 332872566 41449317 702543474 351340530 571827916 757905955 624355518 538670324 804834507 854809264 600859384 226814740 127925123 346671137 787923067 457112128 884106488 339212971 74903564 177208870 555923843 12182774 338050998 195634933 937820530 147513271 682023505 164061002 7287...
output:
892817893
result:
ok 1 number(s): "892817893"
Test #82:
score: 0
Accepted
time: 116ms
memory: 5724kb
input:
396 1999998 264800041 688394921 649512061 848117897 193781083 412762558 178328561 948614820 37468423 620939728 313398577 945767009 280391736 620356404 856956008 118767682 364429990 761366064 520696158 582603898 757470247 488063707 723100049 432054389 688298366 141560963 152903713 118088170 934908396...
output:
474511848
result:
ok 1 number(s): "474511848"
Test #83:
score: 0
Accepted
time: 188ms
memory: 7008kb
input:
495 2000000 199992763 119587511 760715126 704185231 438696524 149776291 609449980 750444399 721615725 187539386 725943017 792566016 65555077 177275411 177252584 58259491 756308610 106837259 310542410 703032481 378204873 541349505 526463795 912331942 991557240 885329131 160990697 169580927 78612328 3...
output:
867643278
result:
ok 1 number(s): "867643278"
Test #84:
score: 0
Accepted
time: 189ms
memory: 7140kb
input:
495 1999999 326097074 536929298 743694770 334584320 582319105 388630771 172828671 15740093 325405140 483730764 711818939 34985620 706445491 994894261 498535039 369137532 894248538 888375970 809438711 874585868 483760109 760851289 45189339 525158809 232374871 830713225 571259578 591375963 541019488 3...
output:
44440732
result:
ok 1 number(s): "44440732"
Test #85:
score: 0
Accepted
time: 190ms
memory: 7072kb
input:
495 1999998 933992376 864507775 335557384 640567418 334931187 300327952 542265054 606513468 981460303 681955689 718930037 966188976 706247961 828555355 590315903 907199764 932213129 662393121 321111296 408930055 348103004 325475013 256625126 443430479 355999605 786925630 197582364 980166780 8222286 ...
output:
711724954
result:
ok 1 number(s): "711724954"
Test #86:
score: 0
Accepted
time: 5ms
memory: 3792kb
input:
99 1000000000 591184175 683230420 724860546 448059813 832686500 969483304 617815978 204583577 978152286 969663831 972087187 995387459 72402624 551474584 850617838 228692769 990440500 273015218 505637672 320187602 246652704 66592579 503998190 800369862 174204787 48400510 684931962 724349596 531915837...
output:
144475837
result:
ok 1 number(s): "144475837"
Test #87:
score: 0
Accepted
time: 52ms
memory: 3656kb
input:
99 999999999 949461221 264071691 450122938 481051051 17737647 315602696 177281560 468797652 101824465 109600079 516667314 186138478 772452662 679650686 283702283 489155979 842181888 120438412 673990232 489785244 419565450 264294906 816108425 694381836 335402379 96031590 933666331 17496877 553206249 ...
output:
7473482
result:
ok 1 number(s): "7473482"
Test #88:
score: 0
Accepted
time: 52ms
memory: 3700kb
input:
99 999999998 649475961 110270714 119967943 485811477 72559651 322732884 992652813 123344491 296356792 498142096 344371340 15253388 963319032 247610287 766705647 224423962 331639969 274593661 594922711 903312310 297434670 366213115 517072226 211212374 616349989 575273766 738812884 830447948 740539562...
output:
292950195
result:
ok 1 number(s): "292950195"
Test #89:
score: 0
Accepted
time: 23ms
memory: 3972kb
input:
198 1000000000 227272399 106046085 672009737 5191729 522473409 824049175 963760846 726745406 348672507 256354359 927603586 590708653 428805353 450870539 427939612 967081220 189068902 739540839 367151792 29414167 799174798 469605155 849093991 526511732 799014032 111481685 72354951 375602500 418061899...
output:
858932873
result:
ok 1 number(s): "858932873"
Test #90:
score: 0
Accepted
time: 69ms
memory: 3808kb
input:
198 999999999 185688750 50604767 941769 138716077 781643342 471678334 29814796 140964589 187802524 693009527 705194772 24960538 784192885 484803678 844063775 644383646 97000175 479338223 865697399 158473877 861258471 294176869 443553118 45424507 538738954 184145080 734025787 87127630 130232142 15356...
output:
175780742
result:
ok 1 number(s): "175780742"
Test #91:
score: 0
Accepted
time: 69ms
memory: 3824kb
input:
198 999999998 680791123 235713498 186653376 573077122 332752187 982349746 543673073 514215663 616328473 337658344 403652776 250471362 794073883 993828650 706504700 520925732 780367499 750745929 748423931 529279095 724564496 72565412 331674519 817312164 549757480 268145052 194277151 229425520 9039043...
output:
413683412
result:
ok 1 number(s): "413683412"
Test #92:
score: 0
Accepted
time: 56ms
memory: 4648kb
input:
297 1000000000 358277328 970314346 742200766 218408210 179653201 311326714 64635432 381224989 307444642 380942051 247699362 519873118 19198504 296775670 780907422 849895862 516614424 59339013 889071757 180375544 485727452 634448475 988344100 529546782 678084804 296844224 993675800 611907716 56888337...
output:
452965265
result:
ok 1 number(s): "452965265"
Test #93:
score: 0
Accepted
time: 102ms
memory: 4760kb
input:
297 999999999 900866917 360200869 395709484 757749028 117063037 661629179 633311841 759151096 923478299 422556165 390459765 171363831 213660786 713345831 732671340 921437820 135744821 589823917 868793338 824656360 730112090 773588239 83093577 926039851 395986109 434266942 839835691 62736091 87335132...
output:
978889019
result:
ok 1 number(s): "978889019"
Test #94:
score: 0
Accepted
time: 102ms
memory: 4648kb
input:
297 999999998 563853122 689106051 38619413 855014497 741007905 125026522 824752065 305680291 920301603 768922066 635337880 936992049 26868731 344005417 450459453 343262736 292747466 311976404 256753791 974682730 785953962 88420644 647243017 60794124 278838520 567351889 842100581 860553137 791454338 ...
output:
337094439
result:
ok 1 number(s): "337094439"
Test #95:
score: 0
Accepted
time: 102ms
memory: 5692kb
input:
396 1000000000 455095903 379997730 615408956 947572481 139854458 680251568 800378036 766193501 92026925 575361343 675994148 200502773 964023534 56834503 420541954 513971259 596508657 622480309 47264208 413112914 68034016 545734945 9718849 893341996 535210225 877633952 135761145 868323777 725911596 6...
output:
81005589
result:
ok 1 number(s): "81005589"
Test #96:
score: 0
Accepted
time: 153ms
memory: 5740kb
input:
396 999999999 273894707 533672580 298635101 523570652 641204891 3807538 655575088 131249750 854240397 817001489 65655896 562755979 424601431 450331320 545760928 685330778 188920989 2147230 603419117 577364198 984542468 215600930 578293449 713614433 466113812 341224442 639545474 202847370 957669202 1...
output:
332504971
result:
ok 1 number(s): "332504971"
Test #97:
score: 0
Accepted
time: 153ms
memory: 5736kb
input:
396 999999998 981488485 703536008 78807774 205589119 163536999 259044858 94173287 916454689 345418878 75407408 471317276 903354720 698851191 763440329 53532665 253920509 83422504 738791991 840127630 410163100 389010077 106505230 42710093 939152225 129540577 732633876 381573317 979513206 655547612 92...
output:
367947411
result:
ok 1 number(s): "367947411"
Test #98:
score: 0
Accepted
time: 179ms
memory: 6976kb
input:
495 1000000000 431545592 281699007 135996572 576786169 265315117 498311459 704888883 217285056 568828050 699763885 457538700 881923543 309485111 751192038 163910903 973065835 979960342 453663994 594739441 968987710 444287050 489230154 970254594 738265480 199108140 890416831 387183489 869335645 41114...
output:
127810975
result:
ok 1 number(s): "127810975"
Test #99:
score: 0
Accepted
time: 226ms
memory: 7064kb
input:
495 999999999 209018962 624594032 50184199 929792075 212108969 474549156 4865543 495708576 295572628 981632798 545693380 712829015 496946571 28580279 129530281 516855205 384421437 544654750 973293177 584111098 749267828 885612821 513825929 823528149 432865757 361007266 16534890 218309049 632959705 6...
output:
852852167
result:
ok 1 number(s): "852852167"
Test #100:
score: 0
Accepted
time: 226ms
memory: 6996kb
input:
495 999999998 273200522 81055097 489872614 453984669 402360579 722419668 973633909 806995126 551716287 628709203 913416539 284923027 719063938 279130025 194520296 194237889 934137727 454283386 159861475 723570799 769549746 384539869 655740374 699545152 844743458 454015996 475289543 950005737 6720863...
output:
512265371
result:
ok 1 number(s): "512265371"
Test #101:
score: 0
Accepted
time: 0ms
memory: 3792kb
input:
2 100 1 0 1000000006
output:
25048157
result:
ok 1 number(s): "25048157"
Extra Test:
score: 0
Extra Test Passed