QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#200215#6370. Slot MachineMaMengQiAC ✓56ms13832kbC++231.6kb2023-10-04 15:48:502023-10-04 15:48:51

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3936kb

input:

7
4 1 2 3 4
1 1
1 2
1 3
1 4
7 4 7 4 4 7 7 4
1 5

output:

2

result:

ok 1 number(s): "2"

Test #2:

score: 0
Accepted
time: 29ms
memory: 8644kb

input:

10
1 971
1 472
1 799
1 68
1 729
1 592
1 616
1 148
1 188
99991 18 79 923 610 734 650 745 482 627 651 914 251 785 787 949 204 400 2 365 569 623 536 508 341 398 840 371 450 332 223 36 578 850 857 192 474 309 933 457 162 200 140 802 462 40 957 553 640 302 748 532 323 593 239 657 425 17 584 924 903 413 3...

output:

993

result:

ok 1 number(s): "993"

Test #3:

score: 0
Accepted
time: 29ms
memory: 9296kb

input:

10
1 3824
1 2925
1 7764
1 8966
1 8030
1 2016
1 4527
1 8663
1 9870
99991 1943 6028 31 1289 4759 4038 2644 3515 4874 2554 1346 6643 7036 9178 4359 999 3343 2269 6839 1086 9576 380 7384 2964 9439 1767 5255 1561 9587 5054 7794 2658 5780 7241 1148 3687 9607 2049 2109 2915 5734 6676 8319 3688 7149 9925 14...

output:

9993

result:

ok 1 number(s): "9993"

Test #4:

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

input:

10
1 13787
1 2459
1 17625
1 37254
1 66685
1 89321
1 34439
1 52752
1 37870
99991 46244 2168 85404 39179 65139 97987 33018 88293 69552 25492 46256 75204 99178 95532 44501 22815 37156 18684 14103 81029 86292 40302 73270 25943 2469 89404 26503 69259 76629 87095 16369 70251 12024 80065 2899 95156 95827 1...

output:

94672

result:

ok 1 number(s): "94672"

Test #5:

score: 0
Accepted
time: 28ms
memory: 8652kb

input:

10
1 191
1 840
1 454
1 910
1 439
1 542
1 882
1 680
1 825
99991 324 104 931 527 35 790 591 385 972 596 913 223 232 139 774 377 890 851 269 227 496 310 419 163 331 265 484 473 641 143 904 897 887 848 1000 914 26 957 495 820 630 386 323 101 757 349 865 477 758 826 546 634 187 80 617 605 946 410 118 884...

output:

993

result:

ok 1 number(s): "993"

Test #6:

score: 0
Accepted
time: 31ms
memory: 9240kb

input:

10
1 7619
1 7400
1 4143
1 6182
1 2644
1 1001
1 7751
1 3185
1 7765
99991 4437 1320 378 6725 7448 3352 7306 6787 838 1907 4269 5989 2851 5304 2193 6114 9081 1063 4042 5432 1622 2569 4049 5831 9515 5608 1072 195 4910 7874 9543 4374 9593 298 2379 1643 5240 3463 2754 4821 8591 7860 920 6438 8434 46 284 7...

output:

9993

result:

ok 1 number(s): "9993"

Test #7:

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

input:

10
1 17985
1 15277
1 34966
1 98767
1 77366
1 97133
1 84728
1 24826
1 55192
99991 94295 17437 69722 45373 95184 67904 58820 1571 7969 48287 27253 55209 43095 4316 78186 99156 73027 60796 79592 14348 49210 1291 68373 34748 2166 10871 88221 62869 99027 15505 20366 96683 96627 975 55740 2839 6235 89996 ...

output:

94597

result:

ok 1 number(s): "94597"

Test #8:

score: 0
Accepted
time: 25ms
memory: 8532kb

input:

10
1 40
1 30
1 961
1 967
1 978
1 312
1 132
1 986
1 551
99991 394 716 383 249 168 924 196 109 615 349 818 796 651 11 797 717 985 262 849 533 925 785 118 134 124 247 165 982 189 434 171 941 583 405 215 298 237 904 630 295 598 538 141 604 832 992 884 756 822 701 161 469 512 739 22 722 92 991 721 27 292...

output:

993

result:

ok 1 number(s): "993"

Test #9:

score: 0
Accepted
time: 34ms
memory: 9404kb

input:

10
1 1215
1 5598
1 2758
1 2633
1 194
1 6475
1 7360
1 5817
1 7715
99991 2026 685 8506 913 3056 4163 1699 7714 2920 1399 1008 8431 1760 6870 3809 5268 8458 8430 2139 3653 956 5553 2501 452 4656 6169 9373 2700 5685 8142 2801 9737 7132 930 7382 8701 1883 982 2773 8525 622 8434 4201 7234 8817 449 162 573...

output:

9993

result:

ok 1 number(s): "9993"

Test #10:

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

input:

10
1 61488
1 57026
1 88388
1 85008
1 70427
1 22340
1 79563
1 60014
1 72418
99991 57251 31889 98320 45383 83378 67234 91236 66946 97337 38527 55083 97244 27668 77277 13980 57845 84242 39652 23806 35136 1911 4785 40017 85602 73082 39636 1830 12854 50248 12851 47650 41451 93759 92325 38400 35588 2420 3...

output:

94526

result:

ok 1 number(s): "94526"

Test #11:

score: 0
Accepted
time: 29ms
memory: 8716kb

input:

10
1 351
1 690
1 601
1 427
1 810
1 482
1 196
1 965
1 275
99991 521 722 83 428 765 885 573 609 485 203 255 577 104 415 887 433 30 181 257 97 61 713 587 492 629 953 825 508 420 198 642 853 28 168 369 678 72 31 949 531 698 170 65 421 592 468 173 344 58 290 219 59 182 46 674 300 655 567 994 683 111 183 ...

output:

993

result:

ok 1 number(s): "993"

Test #12:

score: 0
Accepted
time: 34ms
memory: 9340kb

input:

10
1 8360
1 6570
1 2606
1 9244
1 9439
1 928
1 5331
1 4883
1 4567
99991 7211 3960 592 3396 1418 2974 5659 3361 4735 2999 8465 8603 6592 556 9554 6644 2889 6329 4692 4417 5063 588 958 1677 9071 9945 2654 3940 4325 2520 8756 5337 8565 5221 6468 640 5950 7344 6056 9700 754 8331 3276 1058 3624 3199 5248 ...

output:

9993

result:

ok 1 number(s): "9993"

Test #13:

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

input:

10
1 38323
1 64237
1 80201
1 33269
1 44129
1 91167
1 49392
1 21251
1 12170
99991 92275 37224 41952 62443 25307 83296 27007 12836 19151 10378 76314 61947 44359 2590 57645 34585 34145 92247 31607 11627 51745 84500 98044 61890 11244 35193 24933 44340 90892 26987 24669 45689 99983 1240 54486 68110 28520...

output:

94550

result:

ok 1 number(s): "94550"

Test #14:

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

input:

10
1 225
1 371
1 636
1 651
1 236
1 744
1 897
1 597
1 656
99991 428 605 960 69 816 440 702 470 535 631 324 856 561 204 940 273 265 612 834 952 449 262 850 752 912 990 79 689 917 199 771 695 655 510 725 305 461 405 534 420 181 962 831 351 150 829 682 117 566 973 430 972 700 251 957 270 447 338 331 775...

output:

993

result:

ok 1 number(s): "993"

Test #15:

score: 0
Accepted
time: 29ms
memory: 9332kb

input:

10
1 1949
1 7199
1 1360
1 51
1 2806
1 1241
1 8240
1 2214
1 8440
99991 5524 2729 7268 1629 9766 3399 3176 147 7804 7483 3005 6267 5059 2184 4214 1997 3552 9911 4679 8082 8042 1683 1305 3832 490 1374 3146 3538 5618 9706 651 950 2403 8721 1232 1853 8693 9038 1860 2150 1043 9634 7010 8499 4156 9056 5197...

output:

9993

result:

ok 1 number(s): "9993"

Test #16:

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

input:

10
1 24563
1 21262
1 11560
1 98517
1 56575
1 25724
1 3541
1 88541
1 49647
99991 29506 75638 30422 46505 63454 4846 31273 25738 40262 60563 27829 42274 28322 52524 18926 2035 93839 81593 97274 30294 34621 5515 89683 36342 95026 65735 30184 67698 72614 30695 31451 15007 67045 13433 2212 62756 60304 86...

output:

94594

result:

ok 1 number(s): "94594"

Test #17:

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

input:

10
1 528
1 943
1 57
1 377
1 358
1 5
1 568
1 503
1 543
99991 213 922 582 934 219 651 117 236 167 439 526 413 598 66 696 322 214 182 22 477 577 725 267 578 204 58 368 780 469 714 197 85 126 777 951 657 331 484 132 304 376 118 31 935 785 855 538 823 648 640 335 979 295 553 4 378 723 783 407 637 249 471...

output:

993

result:

ok 1 number(s): "993"

Test #18:

score: 0
Accepted
time: 34ms
memory: 9264kb

input:

10
1 8321
1 9574
1 1849
1 4023
1 1306
1 4865
1 3091
1 1650
1 715
99991 3599 3852 6758 4133 2918 5163 2095 5072 5876 9223 1288 6775 6377 6975 2966 473 5848 1746 6606 6298 4906 9447 3019 5663 9706 8087 2041 2566 7657 1726 1452 3420 8252 6461 3098 3300 1257 9963 1533 8599 9358 3023 1154 5903 9114 5192 ...

output:

9993

result:

ok 1 number(s): "9993"

Test #19:

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

input:

10
1 4557
1 21455
1 97597
1 90599
1 72017
1 62554
1 40045
1 3158
1 43226
99991 57087 99169 42571 86421 31852 17648 24910 8290 54915 11109 53595 51701 69176 5567 14945 27256 61654 92592 17156 36935 38170 13567 15260 77650 42422 52710 50996 36510 70224 35828 87563 82181 8416 74347 39254 14097 64693 10...

output:

94662

result:

ok 1 number(s): "94662"

Test #20:

score: 0
Accepted
time: 26ms
memory: 8564kb

input:

10
1 167
1 983
1 858
1 629
1 914
1 126
1 26
1 706
1 659
99991 289 330 906 795 444 929 254 833 633 310 926 476 521 853 839 947 269 133 497 734 205 987 506 28 746 413 33 990 293 424 508 766 691 275 184 574 234 448 317 451 587 827 381 172 938 902 44 831 802 270 701 119 134 401 880 140 259 536 936 208 3...

output:

993

result:

ok 1 number(s): "993"

Test #21:

score: 0
Accepted
time: 30ms
memory: 9332kb

input:

10
1 449
1 4357
1 4905
1 694
1 6897
1 1147
1 6587
1 2706
1 807
99991 2469 5030 4664 3632 6574 1879 2466 6412 307 5169 2511 1391 9204 2073 8676 1521 5447 8506 3878 1279 2853 6866 5905 4856 7019 2483 6116 624 1451 3 1315 9008 5736 4412 1236 8292 9085 4269 962 1420 4071 3239 2029 6523 7574 1776 5640 37...

output:

9993

result:

ok 1 number(s): "9993"

Test #22:

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

input:

10
1 48482
1 44375
1 14495
1 72373
1 21526
1 16165
1 70556
1 35599
1 50057
99991 61404 2600 94255 65422 35509 21454 65466 55723 67806 93390 39273 38233 95388 95323 27752 59845 18307 13885 32697 91634 86112 31984 42927 55061 84656 66979 46579 3672 92806 54395 20835 57367 86121 34509 36558 14758 95251...

output:

94726

result:

ok 1 number(s): "94726"

Test #23:

score: 0
Accepted
time: 25ms
memory: 8564kb

input:

10
1 497
1 278
1 878
1 188
1 999
1 299
1 136
1 337
1 639
99991 835 266 897 133 62 655 802 626 472 354 552 864 892 756 17 125 993 566 241 267 475 554 679 773 590 496 112 838 583 842 644 147 289 687 431 28 401 876 865 335 306 182 599 781 114 185 816 699 507 484 440 907 243 344 8 308 460 972 165 549 92...

output:

993

result:

ok 1 number(s): "993"

Test #24:

score: 0
Accepted
time: 34ms
memory: 9248kb

input:

10
1 9103
1 4749
1 7046
1 7241
1 687
1 2299
1 5962
1 1033
1 5750
99991 6385 1927 2100 3276 2146 3745 9047 6016 9316 1678 3345 2148 3138 1531 9592 4237 3162 2791 6981 1764 7872 2263 2339 1959 9625 6145 6324 3848 5729 5728 9484 509 8646 2534 7780 8703 3034 4549 2104 6683 7460 6053 138 5572 6160 4946 6...

output:

9993

result:

ok 1 number(s): "9993"

Test #25:

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

input:

10
1 35846
1 39645
1 99440
1 63107
1 75165
1 27461
1 72831
1 64383
1 60466
99991 54765 81628 70385 93206 31577 76266 5600 52798 56628 26897 3161 62340 55693 10587 24044 28388 90773 632 89293 53920 94915 41850 96884 51485 87120 20410 63485 22788 39068 76465 36969 4802 41511 29696 20795 19016 35768 65...

output:

94635

result:

ok 1 number(s): "94635"

Test #26:

score: 0
Accepted
time: 29ms
memory: 8572kb

input:

10
1 502
1 765
1 761
1 348
1 704
1 828
1 771
1 787
1 849
99991 266 333 768 658 414 976 276 488 59 150 475 861 286 855 181 653 209 685 773 458 315 161 381 281 806 347 968 779 296 670 447 845 946 985 213 528 228 103 579 681 871 32 269 130 57 766 514 120 93 513 568 403 824 187 437 177 189 29 415 890 44...

output:

993

result:

ok 1 number(s): "993"

Test #27:

score: 0
Accepted
time: 29ms
memory: 9256kb

input:

10
1 3896
1 2942
1 5566
1 4853
1 7053
1 7438
1 9199
1 8475
1 9587
99991 5859 8732 7158 7419 2337 5120 6547 1662 5775 238 2420 5125 2298 4392 1966 303 9680 2088 699 3774 2790 474 6026 5562 7843 6944 3178 7596 4483 2493 2882 8228 7860 3419 236 4516 6892 6597 790 2467 5473 9037 4928 7004 1007 1239 2576...

output:

9993

result:

ok 1 number(s): "9993"

Test #28:

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

input:

10
1 4076
1 37930
1 25380
1 41174
1 57970
1 45733
1 59331
1 52469
1 85508
99991 69487 27820 91180 39288 48603 43703 81984 79943 65631 90144 49786 46353 75703 46408 27974 57046 15459 79058 13879 98685 16292 28007 42241 48753 12003 72722 57886 42846 83595 62181 98890 96505 58378 64787 58215 97750 2379...

output:

94682

result:

ok 1 number(s): "94682"

Test #29:

score: 0
Accepted
time: 26ms
memory: 8568kb

input:

10
1 748
1 583
1 960
1 250
1 745
1 240
1 792
1 1000
1 645
99991 399 753 746 621 858 395 695 708 758 162 989 871 95 686 620 697 427 611 763 264 63 674 673 814 9 46 702 433 164 928 823 523 111 644 354 734 490 710 129 109 387 191 639 41 818 123 259 528 308 575 922 607 798 274 807 886 382 104 507 202 72...

output:

993

result:

ok 1 number(s): "993"

Test #30:

score: 0
Accepted
time: 30ms
memory: 9408kb

input:

10
1 3967
1 4774
1 4383
1 6163
1 4467
1 2136
1 8776
1 3752
1 7156
99991 9582 7730 175 6477 1758 960 5348 2750 2735 4190 9739 266 2431 8745 6746 2585 9246 865 6684 6887 9713 9054 5279 9523 7424 7033 4439 5921 8664 5534 7385 3960 5945 7649 1361 5205 4488 9925 5948 9190 7583 9478 8798 2800 5465 2065 78...

output:

9993

result:

ok 1 number(s): "9993"

Test #31:

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

input:

10
1 64748
1 22640
1 89549
1 25269
1 63075
1 26515
1 11194
1 58001
1 67069
99991 66446 66518 37122 5173 41314 66640 81897 13738 21203 47384 56235 5824 36104 8707 89492 47741 86798 8586 31345 21580 29013 33675 80149 69469 85169 84807 42837 3075 73882 23234 30892 23700 1132 88231 63256 74893 59016 239...

output:

94595

result:

ok 1 number(s): "94595"

Test #32:

score: 0
Accepted
time: 30ms
memory: 8584kb

input:

10
1 910
1 214
1 56
1 803
1 6
1 400
1 834
1 501
1 271
99991 91 217 204 705 751 609 353 197 433 852 466 254 207 375 274 315 246 459 823 551 952 44 347 481 166 757 37 372 242 411 333 496 176 645 571 464 323 1000 81 990 180 523 249 90 526 461 525 657 901 393 386 908 878 133 241 471 604 183 888 947 826 ...

output:

993

result:

ok 1 number(s): "993"

Test #33:

score: 0
Accepted
time: 33ms
memory: 9340kb

input:

10
1 321
1 5735
1 8664
1 9780
1 4921
1 7631
1 640
1 2214
1 7084
99991 3372 7997 9190 2159 7413 8048 8852 4521 8371 9083 5395 1351 564 6228 4540 4155 7913 7461 6377 4456 2040 2686 218 4216 4458 1810 7587 5238 510 1205 2748 6885 8885 1141 5328 7847 116 9118 2718 918 7973 9476 571 8622 5862 1949 2382 9...

output:

9993

result:

ok 1 number(s): "9993"

Test #34:

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

input:

10
1 22024
1 90001
1 56625
1 51315
1 56335
1 70729
1 19737
1 58958
1 14075
99991 32093 4127 27828 30604 74490 5512 30851 9957 31057 53049 40029 12814 76215 29533 54412 212 49446 6592 97560 23400 46907 64790 31827 91612 31094 6261 8462 28969 70781 98646 71713 7244 32825 84600 12743 31332 2679 21693 2...

output:

94633

result:

ok 1 number(s): "94633"

Test #35:

score: 0
Accepted
time: 27ms
memory: 8728kb

input:

100
1 223
1 476
1 249
1 275
1 790
1 580
1 458
1 753
1 997
1 397
1 11
1 206
1 862
1 337
1 675
1 115
1 300
1 598
1 268
1 937
1 616
1 619
1 372
1 129
1 645
1 975
1 110
1 517
1 621
1 514
1 23
1 117
1 57
1 250
1 41
1 491
1 701
1 160
1 963
1 968
1 993
1 462
1 596
1 185
1 69
1 434
1 626
1 654
1 306
1 103
1...

output:

903

result:

ok 1 number(s): "903"

Test #36:

score: 0
Accepted
time: 30ms
memory: 9344kb

input:

100
1 2133
1 6626
1 6996
1 7406
1 3225
1 711
1 9602
1 479
1 640
1 1194
1 9961
1 2437
1 5532
1 4502
1 293
1 405
1 8017
1 9322
1 756
1 9319
1 1946
1 9191
1 1692
1 1000
1 2500
1 8150
1 3251
1 4296
1 9234
1 3680
1 2054
1 1373
1 8871
1 3044
1 7843
1 4686
1 4367
1 20
1 8542
1 7753
1 86
1 3720
1 9344
1 215...

output:

9903

result:

ok 1 number(s): "9903"

Test #37:

score: 0
Accepted
time: 56ms
memory: 13780kb

input:

100
1 77440
1 19581
1 37972
1 78873
1 2141
1 12632
1 93801
1 65527
1 50911
1 31082
1 95334
1 36153
1 49057
1 5444
1 48440
1 61292
1 26653
1 18133
1 75693
1 65671
1 80598
1 88022
1 17530
1 21762
1 55602
1 90527
1 71476
1 79479
1 69784
1 31311
1 99927
1 45320
1 14038
1 10919
1 56674
1 59992
1 12957
1 ...

output:

94442

result:

ok 1 number(s): "94442"

Test #38:

score: 0
Accepted
time: 28ms
memory: 8568kb

input:

100
1 642
1 27
1 905
1 506
1 333
1 814
1 765
1 456
1 34
1 732
1 195
1 192
1 608
1 543
1 248
1 542
1 196
1 924
1 512
1 640
1 135
1 790
1 270
1 677
1 585
1 946
1 108
1 919
1 551
1 230
1 802
1 594
1 279
1 769
1 363
1 606
1 505
1 276
1 756
1 577
1 723
1 567
1 466
1 473
1 847
1 293
1 851
1 898
1 315
1 83...

output:

903

result:

ok 1 number(s): "903"

Test #39:

score: 0
Accepted
time: 30ms
memory: 9412kb

input:

100
1 5394
1 7677
1 877
1 6588
1 8798
1 9768
1 4968
1 3924
1 1645
1 2121
1 2512
1 814
1 7931
1 9881
1 626
1 2805
1 2024
1 1636
1 4194
1 696
1 8073
1 4621
1 3652
1 9674
1 2406
1 5977
1 6916
1 754
1 7594
1 271
1 5711
1 1692
1 4439
1 1807
1 3528
1 2391
1 2975
1 8936
1 1444
1 1558
1 5164
1 9503
1 9182
1...

output:

9903

result:

ok 1 number(s): "9903"

Test #40:

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

input:

100
1 13198
1 76577
1 39768
1 59524
1 59283
1 78792
1 112
1 35104
1 45343
1 98721
1 3366
1 11574
1 86451
1 83095
1 86292
1 68953
1 99173
1 45160
1 6218
1 22323
1 22047
1 31175
1 91596
1 21280
1 19358
1 24635
1 8370
1 1616
1 16019
1 60543
1 79655
1 392
1 85766
1 64288
1 96459
1 22593
1 18702
1 33794
...

output:

94542

result:

ok 1 number(s): "94542"

Test #41:

score: 0
Accepted
time: 26ms
memory: 8564kb

input:

100
1 881
1 193
1 551
1 284
1 242
1 201
1 293
1 509
1 889
1 216
1 124
1 823
1 171
1 249
1 617
1 157
1 297
1 18
1 345
1 575
1 768
1 77
1 114
1 969
1 304
1 894
1 62
1 829
1 791
1 350
1 298
1 227
1 317
1 603
1 137
1 19
1 658
1 978
1 670
1 411
1 535
1 129
1 927
1 807
1 740
1 310
1 69
1 739
1 516
1 360
1...

output:

903

result:

ok 1 number(s): "903"

Test #42:

score: 0
Accepted
time: 33ms
memory: 9276kb

input:

100
1 436
1 3762
1 4140
1 6373
1 4840
1 8697
1 1644
1 4365
1 2278
1 8364
1 2692
1 6290
1 4006
1 1027
1 9460
1 3383
1 977
1 5929
1 1808
1 4930
1 3671
1 7871
1 1682
1 8986
1 650
1 2264
1 4390
1 3055
1 7361
1 5163
1 7437
1 5666
1 5654
1 8277
1 922
1 2376
1 6888
1 3108
1 8440
1 9867
1 9274
1 2988
1 49
1...

output:

9903

result:

ok 1 number(s): "9903"

Test #43:

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

input:

100
1 54575
1 55820
1 8889
1 10075
1 12381
1 40470
1 12601
1 30859
1 23887
1 37535
1 27892
1 18734
1 23854
1 50191
1 65496
1 29435
1 9320
1 60240
1 57235
1 75730
1 3152
1 74290
1 61018
1 26226
1 64507
1 22759
1 51782
1 62432
1 76260
1 34823
1 80786
1 82887
1 49320
1 79918
1 10366
1 37907
1 79051
1 2...

output:

94558

result:

ok 1 number(s): "94558"

Test #44:

score: 0
Accepted
time: 29ms
memory: 8532kb

input:

100
1 801
1 408
1 589
1 724
1 16
1 247
1 699
1 261
1 876
1 846
1 586
1 944
1 935
1 862
1 707
1 610
1 687
1 632
1 762
1 949
1 738
1 27
1 662
1 607
1 781
1 271
1 728
1 160
1 672
1 130
1 228
1 29
1 11
1 618
1 501
1 560
1 308
1 37
1 190
1 412
1 195
1 814
1 702
1 415
1 723
1 159
1 829
1 414
1 63
1 72
1 8...

output:

903

result:

ok 1 number(s): "903"

Test #45:

score: 0
Accepted
time: 33ms
memory: 9272kb

input:

100
1 9920
1 5354
1 5755
1 61
1 788
1 9621
1 4969
1 8138
1 8466
1 5891
1 336
1 5055
1 7881
1 1400
1 6388
1 9045
1 4464
1 2848
1 875
1 3784
1 3327
1 7112
1 9376
1 2536
1 3092
1 418
1 2467
1 4105
1 5024
1 6949
1 8630
1 786
1 8007
1 9579
1 8242
1 6610
1 1236
1 5698
1 3200
1 6662
1 7138
1 3852
1 4065
1 ...

output:

9903

result:

ok 1 number(s): "9903"

Test #46:

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

input:

100
1 24460
1 49446
1 19316
1 13723
1 407
1 39833
1 96424
1 35353
1 77453
1 52186
1 86321
1 59765
1 63999
1 88942
1 97965
1 27309
1 34453
1 62893
1 92875
1 86227
1 69866
1 84962
1 12112
1 46541
1 12012
1 4749
1 49333
1 57267
1 5309
1 87393
1 97446
1 85749
1 29300
1 95782
1 16292
1 75187
1 82173
1 89...

output:

94524

result:

ok 1 number(s): "94524"

Test #47:

score: 0
Accepted
time: 28ms
memory: 8568kb

input:

100
1 921
1 123
1 991
1 675
1 738
1 495
1 464
1 793
1 387
1 453
1 395
1 687
1 466
1 407
1 249
1 896
1 586
1 493
1 198
1 413
1 473
1 938
1 635
1 292
1 224
1 572
1 911
1 926
1 639
1 270
1 89
1 445
1 259
1 432
1 155
1 674
1 18
1 671
1 195
1 51
1 944
1 378
1 50
1 755
1 470
1 274
1 93
1 621
1 665
1 538
1...

output:

903

result:

ok 1 number(s): "903"

Test #48:

score: 0
Accepted
time: 33ms
memory: 9276kb

input:

100
1 4118
1 2728
1 9154
1 9476
1 1595
1 1413
1 9909
1 7798
1 8846
1 8168
1 5002
1 9546
1 956
1 4135
1 9910
1 2479
1 4979
1 9577
1 884
1 2216
1 9752
1 8556
1 9456
1 251
1 3122
1 1072
1 6764
1 2675
1 140
1 6010
1 7054
1 7327
1 8919
1 1970
1 48
1 9072
1 5205
1 8613
1 8367
1 4191
1 5007
1 2099
1 5005
1...

output:

9903

result:

ok 1 number(s): "9903"

Test #49:

score: 0
Accepted
time: 49ms
memory: 13644kb

input:

100
1 40418
1 34716
1 95449
1 95999
1 30126
1 24361
1 29239
1 54090
1 14087
1 99240
1 22511
1 68387
1 10567
1 17273
1 70862
1 25004
1 70319
1 63297
1 34726
1 92043
1 13506
1 14920
1 5675
1 2986
1 61061
1 49113
1 25686
1 94743
1 6086
1 85125
1 20645
1 76261
1 3121
1 92192
1 2009
1 2026
1 26268
1 803
...

output:

94533

result:

ok 1 number(s): "94533"

Test #50:

score: 0
Accepted
time: 27ms
memory: 8656kb

input:

100
1 303
1 146
1 993
1 957
1 977
1 747
1 923
1 423
1 529
1 179
1 934
1 339
1 72
1 487
1 268
1 173
1 503
1 662
1 467
1 456
1 247
1 37
1 170
1 194
1 938
1 35
1 552
1 429
1 239
1 269
1 78
1 368
1 321
1 67
1 903
1 468
1 841
1 369
1 135
1 240
1 880
1 679
1 281
1 510
1 950
1 778
1 920
1 547
1 886
1 425
1...

output:

903

result:

ok 1 number(s): "903"

Test #51:

score: 0
Accepted
time: 33ms
memory: 9332kb

input:

100
1 7571
1 3254
1 9328
1 6973
1 87
1 666
1 7809
1 9399
1 9257
1 8155
1 7883
1 2213
1 2330
1 6411
1 3303
1 7745
1 8447
1 5022
1 5349
1 9196
1 3601
1 2591
1 5463
1 7320
1 4043
1 4059
1 1300
1 1758
1 303
1 8708
1 4022
1 6234
1 2465
1 7983
1 6988
1 473
1 3066
1 5671
1 1033
1 2466
1 2790
1 520
1 9251
1...

output:

9903

result:

ok 1 number(s): "9903"

Test #52:

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

input:

100
1 5055
1 56500
1 59186
1 25232
1 27489
1 85987
1 65485
1 93964
1 51301
1 71043
1 57580
1 4925
1 38969
1 74669
1 21086
1 98734
1 61291
1 48767
1 97300
1 74511
1 63600
1 16570
1 7812
1 29170
1 77505
1 99170
1 85802
1 24720
1 46425
1 67266
1 78978
1 53283
1 7288
1 81925
1 33231
1 93193
1 42531
1 89...

output:

94495

result:

ok 1 number(s): "94495"

Test #53:

score: 0
Accepted
time: 29ms
memory: 8648kb

input:

100
1 716
1 428
1 211
1 640
1 308
1 239
1 265
1 848
1 421
1 978
1 236
1 312
1 392
1 652
1 734
1 38
1 544
1 829
1 109
1 797
1 310
1 786
1 659
1 740
1 524
1 70
1 327
1 48
1 601
1 481
1 21
1 799
1 402
1 298
1 960
1 837
1 444
1 2
1 560
1 885
1 791
1 648
1 192
1 842
1 824
1 553
1 957
1 466
1 609
1 673
1 ...

output:

903

result:

ok 1 number(s): "903"

Test #54:

score: 0
Accepted
time: 29ms
memory: 9312kb

input:

100
1 9540
1 7714
1 2395
1 97
1 9312
1 3082
1 3426
1 7584
1 3896
1 3793
1 6805
1 9038
1 7535
1 6662
1 593
1 2420
1 6239
1 4603
1 4619
1 2431
1 5831
1 9751
1 5627
1 9456
1 7800
1 932
1 8220
1 5403
1 6807
1 1409
1 4366
1 792
1 9295
1 2368
1 6132
1 4518
1 7260
1 8489
1 1399
1 5427
1 6720
1 3686
1 240
1...

output:

9903

result:

ok 1 number(s): "9903"

Test #55:

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

input:

100
1 9966
1 38650
1 1314
1 54620
1 73162
1 55190
1 25092
1 97449
1 64299
1 58543
1 33376
1 91679
1 69549
1 69205
1 22151
1 98898
1 98994
1 86081
1 40394
1 47995
1 39935
1 77707
1 35137
1 10100
1 76925
1 97106
1 57350
1 23935
1 56281
1 13432
1 17947
1 59872
1 56996
1 56035
1 91776
1 52958
1 55763
1 ...

output:

94459

result:

ok 1 number(s): "94459"

Test #56:

score: 0
Accepted
time: 29ms
memory: 8644kb

input:

100
1 201
1 109
1 179
1 652
1 294
1 381
1 62
1 673
1 28
1 431
1 728
1 473
1 468
1 671
1 967
1 456
1 840
1 151
1 773
1 971
1 746
1 674
1 878
1 559
1 827
1 385
1 509
1 463
1 557
1 930
1 95
1 601
1 65
1 228
1 926
1 657
1 234
1 604
1 791
1 198
1 760
1 722
1 320
1 951
1 445
1 244
1 240
1 653
1 923
1 718
...

output:

903

result:

ok 1 number(s): "903"

Test #57:

score: 0
Accepted
time: 33ms
memory: 9260kb

input:

100
1 3527
1 6827
1 9702
1 4297
1 4716
1 7334
1 4432
1 106
1 1893
1 2948
1 8624
1 6255
1 8647
1 944
1 1003
1 7362
1 8
1 3796
1 6875
1 6017
1 820
1 5633
1 4012
1 5471
1 5769
1 6491
1 464
1 2849
1 3947
1 7163
1 8828
1 259
1 3729
1 5227
1 1689
1 5345
1 5542
1 5565
1 8739
1 5934
1 1705
1 4005
1 6189
1 6...

output:

9903

result:

ok 1 number(s): "9903"

Test #58:

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

input:

100
1 26610
1 74347
1 30357
1 82710
1 27272
1 76085
1 66481
1 6471
1 96892
1 12517
1 82130
1 51188
1 79754
1 64474
1 6974
1 3507
1 82018
1 58596
1 39025
1 52880
1 137
1 66026
1 43161
1 77547
1 84344
1 85509
1 65593
1 49655
1 56540
1 6083
1 65318
1 3869
1 49684
1 46693
1 50061
1 78359
1 48503
1 87009...

output:

94639

result:

ok 1 number(s): "94639"

Test #59:

score: 0
Accepted
time: 29ms
memory: 8708kb

input:

100
1 178
1 226
1 459
1 545
1 883
1 933
1 10
1 713
1 738
1 392
1 975
1 357
1 588
1 64
1 220
1 186
1 160
1 913
1 435
1 776
1 684
1 56
1 592
1 326
1 621
1 744
1 736
1 874
1 683
1 559
1 709
1 206
1 311
1 657
1 201
1 739
1 552
1 221
1 705
1 310
1 837
1 843
1 753
1 594
1 755
1 737
1 162
1 771
1 573
1 299...

output:

903

result:

ok 1 number(s): "903"

Test #60:

score: 0
Accepted
time: 33ms
memory: 9292kb

input:

100
1 5601
1 7703
1 4082
1 5755
1 5933
1 2597
1 9579
1 6649
1 2301
1 334
1 1776
1 6284
1 9228
1 2758
1 604
1 6299
1 7219
1 7800
1 8813
1 5456
1 3812
1 2575
1 9572
1 780
1 306
1 8270
1 1737
1 4497
1 6566
1 2553
1 6917
1 8694
1 636
1 906
1 3463
1 2951
1 8643
1 9533
1 1840
1 8019
1 1441
1 19
1 1478
1 4...

output:

9903

result:

ok 1 number(s): "9903"

Test #61:

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

input:

100
1 22792
1 68436
1 32613
1 87127
1 4035
1 41746
1 69204
1 74068
1 76737
1 43206
1 94594
1 13923
1 49712
1 58598
1 32695
1 15365
1 21617
1 36670
1 85551
1 36847
1 60089
1 36170
1 25466
1 37225
1 65172
1 90527
1 46042
1 99696
1 81630
1 69890
1 50887
1 28020
1 46216
1 58191
1 87854
1 82043
1 15225
1...

output:

94626

result:

ok 1 number(s): "94626"

Test #62:

score: 0
Accepted
time: 29ms
memory: 8500kb

input:

100
1 298
1 119
1 480
1 489
1 877
1 20
1 848
1 943
1 914
1 307
1 409
1 376
1 685
1 898
1 98
1 251
1 192
1 11
1 672
1 582
1 328
1 918
1 842
1 193
1 993
1 28
1 788
1 510
1 237
1 621
1 38
1 865
1 139
1 577
1 445
1 313
1 557
1 463
1 934
1 7
1 365
1 467
1 615
1 528
1 866
1 957
1 351
1 606
1 71
1 177
1 96...

output:

903

result:

ok 1 number(s): "903"

Test #63:

score: 0
Accepted
time: 34ms
memory: 9248kb

input:

100
1 3113
1 4141
1 3008
1 2360
1 7417
1 5950
1 6866
1 1824
1 3865
1 7660
1 8850
1 6346
1 4807
1 5128
1 6240
1 6073
1 9013
1 3834
1 9440
1 374
1 7655
1 6267
1 600
1 5356
1 2390
1 9433
1 8116
1 4317
1 2592
1 5142
1 2610
1 6779
1 9573
1 6378
1 5830
1 928
1 8172
1 1133
1 9687
1 4391
1 3484
1 9326
1 624...

output:

9903

result:

ok 1 number(s): "9903"

Test #64:

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

input:

100
1 31469
1 65992
1 68477
1 25773
1 50859
1 18544
1 92899
1 34304
1 40253
1 32105
1 54767
1 74921
1 61123
1 33698
1 48586
1 53137
1 80463
1 59071
1 20015
1 68663
1 15848
1 16632
1 38000
1 84939
1 69896
1 76632
1 35633
1 8372
1 17726
1 92542
1 62667
1 14475
1 33453
1 53215
1 10506
1 90558
1 69259
1...

output:

94544

result:

ok 1 number(s): "94544"

Test #65:

score: 0
Accepted
time: 28ms
memory: 8708kb

input:

100
1 392
1 492
1 257
1 864
1 634
1 613
1 234
1 357
1 219
1 606
1 253
1 927
1 314
1 501
1 919
1 455
1 386
1 47
1 920
1 771
1 265
1 491
1 206
1 676
1 874
1 925
1 167
1 544
1 475
1 875
1 60
1 48
1 480
1 131
1 648
1 419
1 942
1 547
1 61
1 2
1 713
1 336
1 882
1 390
1 816
1 229
1 738
1 776
1 233
1 865
1 ...

output:

903

result:

ok 1 number(s): "903"

Test #66:

score: 0
Accepted
time: 34ms
memory: 9412kb

input:

100
1 9107
1 4107
1 3471
1 8170
1 13
1 2057
1 8943
1 293
1 8849
1 9922
1 8429
1 1690
1 9439
1 9733
1 7884
1 4843
1 3103
1 4998
1 4436
1 8331
1 4089
1 107
1 7283
1 2262
1 2478
1 4688
1 7847
1 3158
1 4589
1 4931
1 4917
1 4783
1 9006
1 4216
1 9462
1 36
1 5483
1 6134
1 4660
1 9679
1 8562
1 5751
1 386
1 ...

output:

9903

result:

ok 1 number(s): "9903"

Test #67:

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

input:

100
1 70111
1 97445
1 11217
1 41883
1 90122
1 31160
1 64160
1 73692
1 23175
1 10052
1 89350
1 34498
1 86567
1 52879
1 33198
1 83552
1 72461
1 12536
1 77333
1 84925
1 83376
1 9742
1 82541
1 5747
1 73468
1 91926
1 40380
1 31729
1 99473
1 74345
1 80698
1 44250
1 95043
1 44979
1 75703
1 3620
1 5592
1 66...

output:

94552

result:

ok 1 number(s): "94552"

Test #68:

score: 0
Accepted
time: 25ms
memory: 8640kb

input:

1000
1 401
1 887
1 568
1 126
1 964
1 397
1 124
1 358
1 624
1 400
1 421
1 56
1 904
1 620
1 991
1 872
1 893
1 396
1 829
1 651
1 50
1 274
1 221
1 174
1 838
1 519
1 631
1 613
1 389
1 809
1 609
1 694
1 791
1 630
1 851
1 880
1 623
1 786
1 612
1 742
1 921
1 656
1 187
1 319
1 514
1 252
1 326
1 432
1 666
1 2...

output:

2

result:

ok 1 number(s): "2"

Test #69:

score: 0
Accepted
time: 30ms
memory: 9456kb

input:

1000
1 4221
1 5064
1 8944
1 5649
1 5467
1 7897
1 9766
1 512
1 6950
1 5056
1 2655
1 7178
1 9786
1 1599
1 7719
1 1105
1 9749
1 3352
1 8080
1 4330
1 9755
1 9013
1 3311
1 495
1 6083
1 6193
1 6797
1 9200
1 7399
1 749
1 9670
1 77
1 1208
1 2876
1 5981
1 7630
1 3033
1 4166
1 8999
1 6812
1 7071
1 9625
1 3195...

output:

9003

result:

ok 1 number(s): "9003"

Test #70:

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

input:

1000
1 49363
1 18513
1 7018
1 95406
1 29332
1 13968
1 24772
1 68586
1 21156
1 14266
1 72298
1 78810
1 91882
1 28950
1 26380
1 48927
1 42526
1 98749
1 4491
1 13738
1 54668
1 24957
1 59903
1 74565
1 87958
1 54263
1 48177
1 55050
1 83823
1 52866
1 22401
1 98569
1 43744
1 47013
1 67745
1 13895
1 48422
1...

output:

93646

result:

ok 1 number(s): "93646"

Test #71:

score: 0
Accepted
time: 24ms
memory: 8644kb

input:

1000
1 587
1 362
1 615
1 76
1 672
1 836
1 117
1 474
1 183
1 919
1 72
1 966
1 486
1 452
1 412
1 634
1 747
1 769
1 333
1 630
1 212
1 671
1 553
1 845
1 935
1 98
1 681
1 797
1 82
1 549
1 997
1 331
1 980
1 827
1 469
1 197
1 34
1 855
1 304
1 782
1 283
1 189
1 865
1 357
1 886
1 158
1 190
1 928
1 750
1 655
...

output:

2

result:

ok 1 number(s): "2"

Test #72:

score: 0
Accepted
time: 33ms
memory: 9376kb

input:

1000
1 4845
1 6770
1 5638
1 9179
1 3350
1 6962
1 3137
1 2174
1 9055
1 2586
1 2090
1 2840
1 2697
1 7493
1 1486
1 9389
1 4764
1 9232
1 7643
1 5621
1 9855
1 8815
1 3158
1 9790
1 6753
1 3224
1 4726
1 5576
1 4083
1 2118
1 8230
1 9704
1 4892
1 151
1 2199
1 9878
1 2692
1 399
1 2011
1 5310
1 1417
1 323
1 16...

output:

9003

result:

ok 1 number(s): "9003"

Test #73:

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

input:

1000
1 15354
1 17264
1 4143
1 85323
1 42519
1 35130
1 49184
1 99980
1 50513
1 80096
1 36523
1 41387
1 7472
1 89887
1 35849
1 93577
1 79779
1 32474
1 81626
1 38601
1 38138
1 46583
1 24194
1 78132
1 29930
1 20897
1 22695
1 31350
1 20749
1 3173
1 92917
1 1182
1 91295
1 30069
1 92410
1 15042
1 51650
1 5...

output:

93618

result:

ok 1 number(s): "93618"

Test #74:

score: 0
Accepted
time: 25ms
memory: 8568kb

input:

1000
1 304
1 666
1 974
1 455
1 750
1 701
1 492
1 559
1 671
1 18
1 892
1 824
1 759
1 593
1 278
1 184
1 230
1 843
1 858
1 819
1 314
1 397
1 521
1 138
1 82
1 828
1 773
1 396
1 474
1 495
1 944
1 923
1 711
1 451
1 562
1 136
1 639
1 752
1 4
1 269
1 503
1 610
1 745
1 216
1 597
1 137
1 276
1 539
1 955
1 960...

output:

2

result:

ok 1 number(s): "2"

Test #75:

score: 0
Accepted
time: 33ms
memory: 9340kb

input:

1000
1 185
1 4986
1 209
1 7321
1 6367
1 8499
1 9150
1 3021
1 8191
1 6988
1 7580
1 9001
1 176
1 4648
1 741
1 8214
1 8830
1 4513
1 5606
1 3517
1 4697
1 6916
1 6467
1 5582
1 4342
1 227
1 4464
1 5741
1 4861
1 8865
1 6297
1 3344
1 9113
1 1642
1 5307
1 3203
1 9611
1 1544
1 2425
1 5492
1 5528
1 6847
1 5688...

output:

9003

result:

ok 1 number(s): "9003"

Test #76:

score: 0
Accepted
time: 49ms
memory: 13644kb

input:

1000
1 63372
1 81053
1 26744
1 70888
1 31050
1 85336
1 31076
1 93356
1 9056
1 21949
1 15396
1 49621
1 88794
1 74178
1 90719
1 39526
1 10874
1 74737
1 10353
1 14258
1 61591
1 97066
1 24392
1 78755
1 70201
1 42912
1 59690
1 71604
1 69214
1 1112
1 6189
1 38776
1 12632
1 62701
1 15294
1 55729
1 25101
1 ...

output:

93685

result:

ok 1 number(s): "93685"

Test #77:

score: 0
Accepted
time: 25ms
memory: 8648kb

input:

1000
1 375
1 302
1 197
1 632
1 596
1 451
1 736
1 821
1 362
1 501
1 825
1 866
1 620
1 356
1 439
1 267
1 509
1 592
1 126
1 570
1 593
1 626
1 392
1 10
1 224
1 612
1 80
1 28
1 429
1 862
1 477
1 384
1 670
1 901
1 47
1 85
1 406
1 567
1 275
1 746
1 739
1 376
1 950
1 6
1 17
1 706
1 257
1 207
1 962
1 656
1 6...

output:

2

result:

ok 1 number(s): "2"

Test #78:

score: 0
Accepted
time: 30ms
memory: 9316kb

input:

1000
1 6130
1 6801
1 5633
1 8645
1 9127
1 9037
1 8893
1 2996
1 3204
1 8355
1 9313
1 6484
1 8728
1 1030
1 6358
1 6767
1 3732
1 999
1 2873
1 5171
1 2496
1 1183
1 6219
1 2368
1 8679
1 5736
1 4528
1 6396
1 5382
1 1540
1 4193
1 658
1 3569
1 5333
1 2634
1 190
1 5279
1 4979
1 1740
1 3843
1 281
1 5562
1 351...

output:

9003

result:

ok 1 number(s): "9003"

Test #79:

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

input:

1000
1 52062
1 67857
1 68365
1 71371
1 8441
1 87210
1 80719
1 21844
1 83251
1 10776
1 55852
1 55178
1 88991
1 34859
1 83578
1 83085
1 68370
1 25877
1 81103
1 60803
1 87847
1 90287
1 81801
1 77716
1 30620
1 28146
1 80840
1 23663
1 85907
1 31967
1 45710
1 64324
1 92978
1 58968
1 47014
1 15849
1 7747
1...

output:

93686

result:

ok 1 number(s): "93686"

Test #80:

score: 0
Accepted
time: 29ms
memory: 8712kb

input:

1000
1 14
1 322
1 631
1 106
1 974
1 436
1 505
1 178
1 34
1 432
1 643
1 922
1 447
1 909
1 661
1 881
1 198
1 870
1 946
1 548
1 350
1 880
1 9
1 588
1 536
1 175
1 279
1 54
1 466
1 41
1 819
1 609
1 693
1 641
1 11
1 551
1 309
1 280
1 981
1 234
1 489
1 820
1 394
1 811
1 610
1 972
1 740
1 468
1 564
1 917
1 ...

output:

2

result:

ok 1 number(s): "2"

Test #81:

score: 0
Accepted
time: 30ms
memory: 9388kb

input:

1000
1 8251
1 3035
1 4711
1 5318
1 8589
1 894
1 5882
1 1243
1 2523
1 2640
1 8596
1 5662
1 5516
1 8906
1 2027
1 4733
1 2072
1 7676
1 1484
1 568
1 7723
1 8630
1 9189
1 289
1 1848
1 6447
1 7113
1 2483
1 5059
1 4850
1 7247
1 8328
1 3590
1 2524
1 8979
1 9586
1 2989
1 1120
1 772
1 1763
1 7498
1 6691
1 864...

output:

9003

result:

ok 1 number(s): "9003"

Test #82:

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

input:

1000
1 88920
1 74869
1 20136
1 1000
1 36416
1 4414
1 90575
1 34656
1 41886
1 83942
1 45800
1 15945
1 70216
1 25494
1 93460
1 63876
1 36361
1 50536
1 57735
1 54567
1 47136
1 18828
1 59084
1 21019
1 4127
1 67206
1 52700
1 97983
1 95276
1 83598
1 27275
1 36835
1 67203
1 77999
1 67932
1 89838
1 31921
1 ...

output:

93653

result:

ok 1 number(s): "93653"

Test #83:

score: 0
Accepted
time: 29ms
memory: 8572kb

input:

1000
1 890
1 751
1 168
1 529
1 193
1 365
1 320
1 857
1 709
1 931
1 966
1 96
1 525
1 10
1 922
1 669
1 434
1 324
1 753
1 977
1 261
1 930
1 227
1 59
1 990
1 880
1 998
1 721
1 254
1 404
1 681
1 821
1 358
1 98
1 298
1 934
1 814
1 770
1 105
1 43
1 311
1 888
1 179
1 868
1 833
1 796
1 352
1 489
1 158
1 244
...

output:

2

result:

ok 1 number(s): "2"

Test #84:

score: 0
Accepted
time: 34ms
memory: 9324kb

input:

1000
1 6250
1 8062
1 6784
1 7522
1 2522
1 9179
1 2344
1 3220
1 9507
1 2031
1 7621
1 1636
1 8199
1 2457
1 9594
1 4691
1 922
1 7547
1 7521
1 5685
1 4729
1 7213
1 6949
1 5220
1 9008
1 7163
1 2902
1 6733
1 5619
1 4514
1 4793
1 4353
1 966
1 1895
1 2150
1 134
1 869
1 3920
1 8968
1 6404
1 2173
1 7976
1 483...

output:

9003

result:

ok 1 number(s): "9003"

Test #85:

score: 0
Accepted
time: 49ms
memory: 13724kb

input:

1000
1 13673
1 44198
1 46053
1 10227
1 66327
1 40575
1 83933
1 96926
1 46385
1 78661
1 88959
1 93659
1 1271
1 70832
1 6532
1 22830
1 10621
1 91502
1 72442
1 64141
1 25897
1 3007
1 67042
1 51267
1 15480
1 51352
1 77553
1 15439
1 53241
1 14849
1 9715
1 17602
1 15024
1 15895
1 56868
1 75685
1 1621
1 24...

output:

93666

result:

ok 1 number(s): "93666"

Test #86:

score: 0
Accepted
time: 25ms
memory: 8528kb

input:

1000
1 552
1 771
1 17
1 198
1 492
1 480
1 936
1 526
1 111
1 532
1 475
1 835
1 79
1 195
1 839
1 856
1 593
1 598
1 210
1 482
1 510
1 581
1 222
1 769
1 798
1 374
1 553
1 861
1 991
1 34
1 464
1 192
1 848
1 36
1 931
1 872
1 721
1 245
1 824
1 316
1 138
1 744
1 793
1 981
1 93
1 616
1 544
1 912
1 32
1 851
1...

output:

2

result:

ok 1 number(s): "2"

Test #87:

score: 0
Accepted
time: 33ms
memory: 9464kb

input:

1000
1 9935
1 7574
1 5486
1 8522
1 6640
1 2399
1 8505
1 5206
1 782
1 9934
1 3279
1 215
1 5447
1 8967
1 3521
1 6433
1 8621
1 1331
1 916
1 4992
1 6906
1 4414
1 7986
1 5809
1 5559
1 8392
1 2952
1 999
1 5043
1 8085
1 2614
1 4567
1 4610
1 7965
1 9970
1 9820
1 5195
1 8332
1 9349
1 6003
1 5385
1 5027
1 342...

output:

9003

result:

ok 1 number(s): "9003"

Test #88:

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

input:

1000
1 53810
1 51102
1 15223
1 98959
1 58417
1 30840
1 60201
1 97433
1 94539
1 96133
1 77556
1 63825
1 92232
1 83758
1 52073
1 63418
1 76262
1 6130
1 44784
1 44395
1 37140
1 68386
1 48164
1 74512
1 44695
1 91651
1 54643
1 32361
1 88199
1 66287
1 86847
1 33354
1 45427
1 21620
1 67679
1 33946
1 2617
1...

output:

93664

result:

ok 1 number(s): "93664"

Test #89:

score: 0
Accepted
time: 29ms
memory: 8612kb

input:

1000
1 783
1 267
1 513
1 31
1 955
1 389
1 907
1 522
1 831
1 390
1 962
1 959
1 85
1 4
1 409
1 254
1 811
1 571
1 359
1 124
1 920
1 224
1 167
1 576
1 667
1 13
1 729
1 32
1 884
1 425
1 343
1 634
1 73
1 445
1 233
1 227
1 539
1 239
1 25
1 819
1 862
1 75
1 168
1 183
1 996
1 901
1 294
1 331
1 488
1 207
1 17...

output:

2

result:

ok 1 number(s): "2"

Test #90:

score: 0
Accepted
time: 26ms
memory: 9296kb

input:

1000
1 7773
1 2531
1 372
1 2050
1 8679
1 3037
1 4426
1 5209
1 3608
1 9345
1 5519
1 8006
1 9194
1 938
1 1413
1 8302
1 7181
1 5897
1 5879
1 5674
1 4308
1 4160
1 1826
1 5593
1 1908
1 376
1 2868
1 1979
1 5800
1 6908
1 2756
1 8023
1 9423
1 8796
1 7145
1 6806
1 9020
1 4491
1 5793
1 677
1 3174
1 3778
1 438...

output:

9003

result:

ok 1 number(s): "9003"

Test #91:

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

input:

1000
1 12926
1 64174
1 18552
1 19606
1 28850
1 82796
1 63350
1 99172
1 58466
1 83726
1 17577
1 4443
1 99259
1 47103
1 41539
1 37848
1 81967
1 60559
1 94998
1 58814
1 4790
1 94513
1 6492
1 10512
1 36136
1 82332
1 55823
1 22552
1 48515
1 73163
1 91922
1 45027
1 39115
1 83997
1 48486
1 24259
1 54405
1 ...

output:

93666

result:

ok 1 number(s): "93666"

Test #92:

score: 0
Accepted
time: 28ms
memory: 8572kb

input:

1000
1 615
1 397
1 227
1 304
1 851
1 341
1 280
1 913
1 833
1 780
1 687
1 924
1 483
1 704
1 278
1 738
1 528
1 204
1 163
1 975
1 641
1 488
1 59
1 717
1 733
1 743
1 647
1 288
1 149
1 151
1 354
1 514
1 832
1 549
1 820
1 449
1 153
1 398
1 546
1 605
1 908
1 879
1 643
1 427
1 301
1 143
1 724
1 752
1 456
1 ...

output:

2

result:

ok 1 number(s): "2"

Test #93:

score: 0
Accepted
time: 30ms
memory: 9452kb

input:

1000
1 4253
1 9100
1 1154
1 8268
1 3581
1 3778
1 6712
1 5015
1 8248
1 9794
1 2692
1 6414
1 1814
1 9261
1 1428
1 1484
1 4482
1 6119
1 5393
1 6590
1 7611
1 7161
1 3394
1 9096
1 406
1 6175
1 8582
1 7568
1 5962
1 2922
1 6351
1 2658
1 4978
1 7422
1 9777
1 2634
1 6543
1 6070
1 7415
1 5021
1 9684
1 6556
1 ...

output:

9003

result:

ok 1 number(s): "9003"

Test #94:

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

input:

1000
1 63640
1 30411
1 15427
1 53074
1 18021
1 83134
1 78009
1 16172
1 1389
1 66794
1 4357
1 17273
1 81253
1 96301
1 32270
1 25464
1 46729
1 59015
1 31683
1 28843
1 20088
1 4987
1 15187
1 40952
1 97429
1 93777
1 28661
1 38249
1 39688
1 82007
1 60674
1 37869
1 81819
1 49339
1 40374
1 20533
1 32414
1 ...

output:

93604

result:

ok 1 number(s): "93604"

Test #95:

score: 0
Accepted
time: 27ms
memory: 8692kb

input:

1000
1 832
1 150
1 445
1 331
1 66
1 873
1 839
1 739
1 728
1 225
1 649
1 188
1 700
1 277
1 833
1 119
1 13
1 139
1 823
1 387
1 648
1 113
1 529
1 58
1 770
1 597
1 376
1 537
1 551
1 807
1 674
1 603
1 799
1 722
1 790
1 431
1 363
1 966
1 91
1 166
1 828
1 417
1 25
1 718
1 861
1 937
1 965
1 265
1 676
1 851
...

output:

2

result:

ok 1 number(s): "2"

Test #96:

score: 0
Accepted
time: 26ms
memory: 9388kb

input:

1000
1 1491
1 8990
1 200
1 1208
1 4997
1 4633
1 5798
1 220
1 7933
1 7479
1 9847
1 5882
1 1072
1 9291
1 1017
1 9058
1 2167
1 2257
1 7070
1 7703
1 3727
1 6038
1 9294
1 2898
1 2999
1 891
1 6482
1 7389
1 2085
1 4277
1 7162
1 7208
1 7522
1 2032
1 1720
1 1687
1 4537
1 5015
1 6755
1 6273
1 2124
1 3278
1 79...

output:

9003

result:

ok 1 number(s): "9003"

Test #97:

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

input:

1000
1 39009
1 76225
1 71487
1 71958
1 41980
1 72546
1 15263
1 16304
1 18246
1 67467
1 93162
1 11969
1 88961
1 41001
1 52803
1 49383
1 39696
1 70798
1 37520
1 4677
1 61564
1 46
1 78620
1 73699
1 93745
1 47522
1 45044
1 76555
1 32414
1 30632
1 91402
1 49165
1 34009
1 74848
1 2325
1 40123
1 99865
1 98...

output:

93651

result:

ok 1 number(s): "93651"

Test #98:

score: 0
Accepted
time: 25ms
memory: 8560kb

input:

1000
1 175
1 408
1 822
1 417
1 253
1 65
1 422
1 784
1 392
1 797
1 317
1 526
1 916
1 894
1 687
1 271
1 616
1 921
1 24
1 369
1 929
1 702
1 454
1 721
1 136
1 91
1 899
1 372
1 960
1 217
1 804
1 478
1 345
1 141
1 998
1 672
1 840
1 554
1 676
1 200
1 770
1 59
1 837
1 680
1 903
1 301
1 103
1 233
1 792
1 129...

output:

2

result:

ok 1 number(s): "2"

Test #99:

score: 0
Accepted
time: 30ms
memory: 9432kb

input:

1000
1 3448
1 5036
1 1926
1 4787
1 8469
1 5733
1 4371
1 1764
1 2285
1 8609
1 600
1 1238
1 5745
1 9272
1 673
1 109
1 2518
1 6811
1 9871
1 5281
1 822
1 6251
1 7843
1 2577
1 3551
1 2127
1 2503
1 6203
1 7586
1 3779
1 6725
1 8725
1 229
1 5812
1 4301
1 7607
1 610
1 5700
1 7860
1 558
1 7542
1 9804
1 784
1 ...

output:

9003

result:

ok 1 number(s): "9003"

Test #100:

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

input:

1000
1 6732
1 56157
1 28279
1 72421
1 67830
1 41558
1 80255
1 11751
1 14175
1 82910
1 53602
1 84313
1 59664
1 61329
1 21690
1 25116
1 4439
1 57330
1 9192
1 93811
1 40355
1 90280
1 86191
1 47815
1 21739
1 32923
1 89652
1 96516
1 91687
1 40315
1 9444
1 3706
1 93813
1 51930
1 84398
1 95164
1 51254
1 99...

output:

93621

result:

ok 1 number(s): "93621"

Test #101:

score: 0
Accepted
time: 29ms
memory: 8860kb

input:

5000
1 525
1 227
1 25
1 423
1 540
1 217
1 96
1 306
1 156
1 783
1 254
1 515
1 651
1 732
1 569
1 249
1 83
1 602
1 198
1 433
1 97
1 417
1 427
1 740
1 896
1 737
1 548
1 542
1 84
1 57
1 673
1 992
1 745
1 831
1 936
1 456
1 522
1 99
1 4
1 735
1 863
1 666
1 891
1 939
1 993
1 476
1 508
1 580
1 152
1 884
1 42...

output:

2

result:

ok 1 number(s): "2"

Test #102:

score: 0
Accepted
time: 34ms
memory: 9476kb

input:

5000
1 3781
1 3813
1 8911
1 5753
1 5853
1 4766
1 8995
1 8341
1 7799
1 6331
1 6068
1 1095
1 4538
1 3479
1 3704
1 2890
1 8669
1 3743
1 2459
1 7647
1 1758
1 7527
1 3053
1 7113
1 463
1 2211
1 1248
1 6433
1 4243
1 6207
1 4171
1 4098
1 8614
1 392
1 8969
1 7422
1 1235
1 3169
1 8235
1 6007
1 1195
1 8079
1 8...

output:

5003

result:

ok 1 number(s): "5003"

Test #103:

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

input:

5000
1 85355
1 11590
1 81128
1 87948
1 92248
1 62508
1 76577
1 52968
1 44583
1 34256
1 33691
1 36211
1 50738
1 22265
1 2902
1 26031
1 55585
1 53954
1 49703
1 64240
1 93235
1 95004
1 18934
1 77505
1 28700
1 17385
1 25248
1 40223
1 22465
1 85762
1 64117
1 77404
1 38910
1 71699
1 59451
1 89438
1 75424
...

output:

89688

result:

ok 1 number(s): "89688"

Test #104:

score: 0
Accepted
time: 29ms
memory: 8832kb

input:

5000
1 104
1 817
1 427
1 411
1 436
1 632
1 17
1 559
1 869
1 989
1 344
1 551
1 556
1 126
1 944
1 857
1 912
1 768
1 45
1 798
1 226
1 743
1 527
1 931
1 410
1 193
1 259
1 800
1 22
1 635
1 583
1 828
1 866
1 699
1 135
1 203
1 348
1 210
1 598
1 531
1 645
1 659
1 138
1 129
1 514
1 127
1 425
1 637
1 665
1 50...

output:

2

result:

ok 1 number(s): "2"

Test #105:

score: 0
Accepted
time: 29ms
memory: 9480kb

input:

5000
1 8121
1 8275
1 2817
1 4506
1 1835
1 9816
1 276
1 3120
1 8674
1 6490
1 4271
1 1246
1 6856
1 2830
1 1208
1 3331
1 3583
1 6155
1 5303
1 8785
1 4457
1 3951
1 6252
1 704
1 5406
1 2857
1 2518
1 8234
1 9673
1 2320
1 9181
1 6589
1 8299
1 5370
1 9481
1 8844
1 135
1 6038
1 7912
1 8542
1 3252
1 563
1 815...

output:

5003

result:

ok 1 number(s): "5003"

Test #106:

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

input:

5000
1 87272
1 86653
1 28097
1 35180
1 2594
1 30119
1 41304
1 40951
1 42703
1 73689
1 34767
1 27078
1 58281
1 83316
1 88467
1 25403
1 7985
1 54171
1 45814
1 52572
1 90281
1 94007
1 43595
1 76788
1 65944
1 883
1 54221
1 73231
1 3978
1 57472
1 28953
1 18401
1 96750
1 74867
1 59727
1 83360
1 56086
1 81...

output:

89720

result:

ok 1 number(s): "89720"

Test #107:

score: 0
Accepted
time: 24ms
memory: 8860kb

input:

5000
1 739
1 242
1 912
1 456
1 190
1 70
1 362
1 645
1 802
1 839
1 14
1 116
1 558
1 573
1 419
1 687
1 499
1 994
1 464
1 347
1 337
1 295
1 477
1 162
1 51
1 157
1 729
1 638
1 866
1 114
1 767
1 52
1 105
1 491
1 378
1 523
1 58
1 278
1 819
1 468
1 479
1 425
1 286
1 704
1 745
1 158
1 237
1 763
1 633
1 1
1 ...

output:

2

result:

ok 1 number(s): "2"

Test #108:

score: 0
Accepted
time: 26ms
memory: 9488kb

input:

5000
1 8316
1 9855
1 3466
1 3083
1 4919
1 2110
1 3394
1 5829
1 3398
1 5744
1 1451
1 5624
1 7196
1 7939
1 8953
1 8229
1 3790
1 9946
1 1556
1 8467
1 4743
1 1902
1 4633
1 7962
1 5749
1 2873
1 4134
1 8342
1 5802
1 4585
1 6930
1 4954
1 9260
1 2083
1 131
1 634
1 2533
1 3518
1 9301
1 1391
1 4147
1 1092
1 2...

output:

5003

result:

ok 1 number(s): "5003"

Test #109:

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

input:

5000
1 10190
1 1454
1 64865
1 5612
1 30779
1 89296
1 82055
1 93343
1 528
1 84316
1 67185
1 34016
1 13996
1 7497
1 89339
1 95475
1 59493
1 42021
1 34226
1 12718
1 35008
1 24080
1 77846
1 31676
1 43354
1 37183
1 95679
1 16219
1 11714
1 82042
1 42389
1 12575
1 51516
1 90429
1 42519
1 59277
1 92063
1 46...

output:

89634

result:

ok 1 number(s): "89634"

Test #110:

score: 0
Accepted
time: 28ms
memory: 8916kb

input:

5000
1 961
1 529
1 612
1 524
1 291
1 848
1 821
1 274
1 495
1 870
1 838
1 156
1 4
1 513
1 913
1 778
1 644
1 623
1 51
1 166
1 720
1 646
1 885
1 878
1 897
1 149
1 844
1 816
1 265
1 161
1 14
1 622
1 905
1 710
1 964
1 371
1 350
1 562
1 253
1 493
1 516
1 381
1 375
1 196
1 453
1 205
1 238
1 256
1 406
1 779...

output:

2

result:

ok 1 number(s): "2"

Test #111:

score: 0
Accepted
time: 33ms
memory: 9572kb

input:

5000
1 8688
1 147
1 915
1 3266
1 7072
1 3893
1 4451
1 521
1 323
1 9741
1 7515
1 8856
1 3392
1 7894
1 1246
1 6883
1 6580
1 7628
1 6466
1 6595
1 6288
1 5026
1 8786
1 3922
1 9913
1 4844
1 444
1 7648
1 7416
1 469
1 5844
1 6593
1 9416
1 5867
1 7599
1 9405
1 1099
1 3566
1 8489
1 4175
1 4309
1 8164
1 6656
...

output:

5003

result:

ok 1 number(s): "5003"

Test #112:

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

input:

5000
1 29592
1 4091
1 97664
1 83301
1 17988
1 5281
1 16586
1 6220
1 90643
1 83688
1 6853
1 5156
1 94826
1 90463
1 74455
1 5807
1 99312
1 31613
1 67818
1 73172
1 37138
1 52475
1 42285
1 11070
1 77792
1 52340
1 59153
1 93118
1 27598
1 15596
1 77
1 73957
1 83060
1 63846
1 38747
1 1035
1 62831
1 20013
1...

output:

89667

result:

ok 1 number(s): "89667"

Test #113:

score: 0
Accepted
time: 24ms
memory: 8832kb

input:

5000
1 848
1 461
1 524
1 417
1 257
1 511
1 909
1 819
1 729
1 626
1 187
1 844
1 698
1 391
1 536
1 670
1 93
1 946
1 394
1 97
1 412
1 861
1 762
1 886
1 681
1 771
1 783
1 389
1 261
1 637
1 896
1 576
1 792
1 237
1 918
1 273
1 613
1 279
1 521
1 630
1 712
1 92
1 184
1 823
1 450
1 188
1 958
1 224
1 344
1 75...

output:

2

result:

ok 1 number(s): "2"

Test #114:

score: 0
Accepted
time: 29ms
memory: 9476kb

input:

5000
1 8999
1 756
1 2563
1 357
1 7670
1 2593
1 6573
1 1887
1 3476
1 8166
1 4052
1 9775
1 9007
1 6168
1 6713
1 9995
1 9898
1 7535
1 561
1 4526
1 3324
1 3223
1 2854
1 8916
1 1953
1 2495
1 5573
1 4145
1 2824
1 5180
1 9966
1 8059
1 2467
1 9655
1 983
1 4652
1 6666
1 8475
1 5401
1 9761
1 1592
1 3944
1 524...

output:

5003

result:

ok 1 number(s): "5003"

Test #115:

score: 0
Accepted
time: 38ms
memory: 13728kb

input:

5000
1 54453
1 11546
1 72996
1 96476
1 79857
1 51845
1 43824
1 95837
1 6322
1 67741
1 77310
1 62693
1 57792
1 21932
1 65633
1 20696
1 72440
1 4655
1 15776
1 55982
1 96427
1 30008
1 76470
1 44081
1 57021
1 62157
1 95440
1 72003
1 90662
1 95398
1 13170
1 60118
1 24852
1 38802
1 96626
1 97714
1 48935
1...

output:

89658

result:

ok 1 number(s): "89658"

Test #116:

score: 0
Accepted
time: 28ms
memory: 8916kb

input:

5000
1 390
1 186
1 285
1 713
1 860
1 536
1 97
1 834
1 18
1 684
1 831
1 647
1 352
1 295
1 504
1 556
1 595
1 103
1 60
1 224
1 211
1 262
1 85
1 815
1 172
1 513
1 106
1 288
1 65
1 537
1 925
1 967
1 964
1 261
1 270
1 885
1 528
1 807
1 509
1 67
1 904
1 531
1 755
1 35
1 436
1 771
1 962
1 643
1 813
1 921
1 ...

output:

2

result:

ok 1 number(s): "2"

Test #117:

score: 0
Accepted
time: 29ms
memory: 9508kb

input:

5000
1 3409
1 1627
1 2588
1 6390
1 1303
1 4318
1 3702
1 5765
1 7308
1 2247
1 1601
1 1165
1 2702
1 4384
1 4075
1 2475
1 1963
1 6933
1 3591
1 3950
1 5833
1 3960
1 2378
1 9913
1 5183
1 1310
1 9199
1 9266
1 8457
1 688
1 3460
1 9750
1 9623
1 6331
1 2363
1 9522
1 4558
1 2640
1 9322
1 6763
1 6518
1 6260
1 ...

output:

5003

result:

ok 1 number(s): "5003"

Test #118:

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

input:

5000
1 49862
1 98027
1 37965
1 91509
1 34160
1 99004
1 71658
1 34125
1 65396
1 30454
1 2398
1 1181
1 80930
1 35411
1 95990
1 62985
1 77281
1 98754
1 84752
1 21706
1 84682
1 81286
1 62241
1 56428
1 52714
1 60981
1 99824
1 16816
1 37348
1 48601
1 20984
1 43275
1 69901
1 38963
1 88074
1 84069
1 89167
1...

output:

89558

result:

ok 1 number(s): "89558"

Test #119:

score: 0
Accepted
time: 25ms
memory: 8804kb

input:

5000
1 613
1 143
1 173
1 862
1 458
1 216
1 666
1 425
1 686
1 347
1 260
1 269
1 58
1 379
1 334
1 702
1 29
1 543
1 665
1 638
1 727
1 400
1 871
1 825
1 614
1 529
1 175
1 468
1 12
1 331
1 926
1 782
1 648
1 459
1 494
1 343
1 324
1 181
1 618
1 835
1 240
1 257
1 117
1 597
1 163
1 777
1 291
1 427
1 388
1 40...

output:

2

result:

ok 1 number(s): "2"

Test #120:

score: 0
Accepted
time: 33ms
memory: 9568kb

input:

5000
1 7541
1 2187
1 1850
1 4782
1 4995
1 892
1 5761
1 7476
1 2555
1 6793
1 8853
1 6801
1 5029
1 7696
1 8626
1 4357
1 7199
1 8452
1 4983
1 1684
1 5305
1 9610
1 23
1 2023
1 953
1 5181
1 5400
1 6936
1 969
1 3771
1 2358
1 8089
1 8404
1 8470
1 9089
1 6766
1 8348
1 2069
1 8330
1 4654
1 4439
1 7456
1 7834...

output:

5003

result:

ok 1 number(s): "5003"

Test #121:

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

input:

5000
1 39399
1 84388
1 96666
1 80784
1 47854
1 11527
1 96323
1 97336
1 8859
1 95559
1 60976
1 6496
1 25064
1 88559
1 34599
1 42510
1 83908
1 60191
1 90143
1 38683
1 61266
1 81386
1 3558
1 55508
1 87592
1 79064
1 83932
1 77916
1 30161
1 37797
1 33206
1 29768
1 56300
1 12736
1 55100
1 43713
1 11850
1 ...

output:

89593

result:

ok 1 number(s): "89593"

Test #122:

score: 0
Accepted
time: 31ms
memory: 8840kb

input:

5000
1 915
1 351
1 941
1 301
1 585
1 127
1 224
1 644
1 788
1 243
1 217
1 366
1 743
1 156
1 566
1 439
1 842
1 726
1 111
1 404
1 103
1 600
1 450
1 999
1 406
1 488
1 360
1 95
1 105
1 173
1 214
1 729
1 307
1 459
1 9
1 175
1 979
1 424
1 932
1 4
1 272
1 627
1 483
1 281
1 74
1 235
1 888
1 279
1 840
1 126
1...

output:

2

result:

ok 1 number(s): "2"

Test #123:

score: 0
Accepted
time: 30ms
memory: 9540kb

input:

5000
1 4700
1 9376
1 2510
1 2269
1 6488
1 4902
1 8335
1 8219
1 2369
1 3556
1 4581
1 6677
1 2931
1 5557
1 7494
1 961
1 2304
1 4477
1 8798
1 9403
1 141
1 2864
1 9899
1 5939
1 8577
1 9192
1 1824
1 9244
1 7241
1 3714
1 2226
1 2815
1 663
1 4065
1 350
1 7574
1 7198
1 842
1 9601
1 2001
1 2072
1 71
1 430
1 ...

output:

5003

result:

ok 1 number(s): "5003"

Test #124:

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

input:

5000
1 82286
1 61800
1 2263
1 33535
1 4449
1 21455
1 70512
1 79003
1 37844
1 53300
1 51681
1 59295
1 32511
1 5339
1 84964
1 24450
1 42654
1 48590
1 1366
1 4831
1 91346
1 7515
1 56763
1 36437
1 29918
1 79953
1 90327
1 16711
1 55436
1 86279
1 50710
1 76893
1 86725
1 97590
1 10917
1 28353
1 90908
1 879...

output:

89589

result:

ok 1 number(s): "89589"

Test #125:

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

input:

5000
1 642
1 852
1 130
1 521
1 502
1 321
1 148
1 212
1 13
1 192
1 960
1 536
1 949
1 344
1 181
1 400
1 334
1 768
1 419
1 323
1 620
1 968
1 290
1 573
1 38
1 45
1 307
1 541
1 914
1 810
1 245
1 365
1 55
1 58
1 506
1 254
1 697
1 759
1 351
1 793
1 384
1 894
1 368
1 958
1 17
1 449
1 721
1 465
1 139
1 627
1...

output:

2

result:

ok 1 number(s): "2"

Test #126:

score: 0
Accepted
time: 30ms
memory: 9572kb

input:

5000
1 3447
1 6788
1 6231
1 1191
1 9015
1 3305
1 713
1 7814
1 1726
1 4507
1 4717
1 4124
1 2502
1 2875
1 5958
1 2215
1 2428
1 4146
1 8635
1 8950
1 4770
1 3592
1 4713
1 4158
1 6205
1 3966
1 8558
1 6360
1 5255
1 5
1 4479
1 8880
1 6350
1 4245
1 1875
1 1464
1 7875
1 2727
1 7509
1 51
1 813
1 4907
1 9878
1...

output:

5003

result:

ok 1 number(s): "5003"

Test #127:

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

input:

5000
1 81923
1 31986
1 10056
1 75340
1 34469
1 28418
1 54727
1 51991
1 6852
1 26739
1 87132
1 80898
1 26976
1 83580
1 27384
1 63269
1 84224
1 67383
1 75955
1 51741
1 91371
1 63713
1 9448
1 3625
1 16048
1 56541
1 18774
1 98157
1 78974
1 78130
1 81920
1 29074
1 86604
1 76616
1 67086
1 68324
1 31666
1 ...

output:

89603

result:

ok 1 number(s): "89603"

Test #128:

score: 0
Accepted
time: 30ms
memory: 8828kb

input:

5000
1 547
1 963
1 107
1 847
1 797
1 581
1 849
1 721
1 898
1 35
1 836
1 193
1 479
1 74
1 245
1 316
1 375
1 958
1 685
1 648
1 246
1 531
1 397
1 252
1 941
1 205
1 47
1 414
1 385
1 880
1 66
1 499
1 76
1 657
1 298
1 386
1 875
1 106
1 493
1 313
1 742
1 522
1 7
1 167
1 115
1 275
1 359
1 752
1 114
1 827
1 ...

output:

2

result:

ok 1 number(s): "2"

Test #129:

score: 0
Accepted
time: 29ms
memory: 9576kb

input:

5000
1 432
1 7752
1 7995
1 5296
1 3678
1 5339
1 2117
1 1868
1 6646
1 8120
1 3029
1 6739
1 108
1 375
1 9627
1 792
1 5996
1 7812
1 7867
1 3231
1 5221
1 9663
1 9407
1 499
1 4633
1 9946
1 4739
1 5809
1 2255
1 9710
1 1020
1 8321
1 5206
1 8657
1 3799
1 9086
1 5281
1 9272
1 7342
1 9273
1 7620
1 7530
1 3885...

output:

5003

result:

ok 1 number(s): "5003"

Test #130:

score: 0
Accepted
time: 49ms
memory: 13724kb

input:

5000
1 65194
1 20399
1 51330
1 12045
1 2866
1 71101
1 60043
1 551
1 51308
1 15207
1 26142
1 20722
1 88352
1 73366
1 39110
1 19494
1 59102
1 981
1 19893
1 3969
1 33336
1 83506
1 26717
1 83619
1 89763
1 77953
1 64983
1 40466
1 57242
1 1113
1 88224
1 50743
1 60635
1 20085
1 99799
1 7232
1 11431
1 50964...

output:

89641

result:

ok 1 number(s): "89641"

Test #131:

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

input:

5000
1 648
1 226
1 361
1 741
1 432
1 166
1 927
1 113
1 291
1 420
1 215
1 688
1 23
1 616
1 800
1 679
1 359
1 207
1 535
1 296
1 168
1 759
1 124
1 416
1 188
1 517
1 51
1 247
1 626
1 20
1 205
1 547
1 531
1 805
1 876
1 677
1 591
1 665
1 330
1 586
1 974
1 41
1 347
1 227
1 400
1 391
1 70
1 589
1 790
1 402
...

output:

2

result:

ok 1 number(s): "2"

Test #132:

score: 0
Accepted
time: 30ms
memory: 9568kb

input:

5000
1 1025
1 9729
1 7998
1 4218
1 7320
1 8978
1 8758
1 3149
1 5489
1 5475
1 7087
1 8233
1 608
1 3121
1 7400
1 7283
1 1453
1 6797
1 6225
1 2567
1 8019
1 938
1 7937
1 5795
1 7313
1 6259
1 4225
1 8937
1 9596
1 227
1 959
1 5457
1 2923
1 667
1 6396
1 2836
1 2282
1 7727
1 14
1 3314
1 1720
1 1641
1 8895
1...

output:

5003

result:

ok 1 number(s): "5003"

Test #133:

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

input:

5000
1 92648
1 85121
1 36805
1 83321
1 83773
1 55121
1 43434
1 66388
1 29680
1 35026
1 36454
1 31527
1 96884
1 88284
1 17821
1 24301
1 57823
1 49483
1 19449
1 37827
1 302
1 45920
1 27624
1 85325
1 4670
1 77342
1 28953
1 67568
1 7284
1 98414
1 58499
1 81238
1 49559
1 79772
1 49279
1 685
1 48752
1 641...

output:

89664

result:

ok 1 number(s): "89664"

Test #134:

score: 0
Accepted
time: 26ms
memory: 9632kb

input:

20000
1 47
1 716
1 244
1 113
1 969
1 712
1 112
1 225
1 93
1 190
1 258
1 121
1 50
1 102
1 196
1 860
1 763
1 614
1 540
1 239
1 201
1 767
1 908
1 575
1 286
1 804
1 96
1 961
1 730
1 886
1 659
1 665
1 945
1 770
1 90
1 356
1 418
1 944
1 823
1 813
1 586
1 246
1 215
1 383
1 76
1 525
1 466
1 318
1 118
1 221
...

output:

2

result:

ok 1 number(s): "2"

Test #135:

score: 0
Accepted
time: 27ms
memory: 10208kb

input:

20000
1 6803
1 2318
1 7731
1 2815
1 4207
1 6978
1 8760
1 1026
1 3166
1 9035
1 319
1 4393
1 9792
1 1326
1 6601
1 9624
1 2822
1 2498
1 9643
1 394
1 7961
1 5044
1 8575
1 126
1 4659
1 644
1 9058
1 2662
1 8324
1 4582
1 4932
1 4678
1 3151
1 6371
1 8123
1 4235
1 4858
1 2645
1 8736
1 8722
1 5826
1 6014
1 14...

output:

2

result:

ok 1 number(s): "2"

Test #136:

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

input:

20000
1 57643
1 54230
1 29290
1 96428
1 40456
1 92035
1 5275
1 5639
1 97850
1 10902
1 20688
1 19
1 12683
1 48025
1 53434
1 69714
1 51415
1 29289
1 10274
1 44094
1 11055
1 25560
1 26976
1 55264
1 32150
1 42892
1 44997
1 42905
1 32551
1 81501
1 37714
1 27292
1 62253
1 1018
1 59999
1 9522
1 62185
1 419...

output:

74702

result:

ok 1 number(s): "74702"

Test #137:

score: 0
Accepted
time: 22ms
memory: 9628kb

input:

20000
1 682
1 240
1 268
1 467
1 868
1 796
1 99
1 876
1 93
1 236
1 97
1 458
1 836
1 748
1 430
1 333
1 412
1 406
1 256
1 239
1 480
1 688
1 115
1 826
1 642
1 577
1 732
1 990
1 618
1 456
1 517
1 60
1 645
1 637
1 933
1 262
1 860
1 646
1 501
1 460
1 585
1 20
1 243
1 872
1 981
1 899
1 91
1 859
1 997
1 461
...

output:

2

result:

ok 1 number(s): "2"

Test #138:

score: 0
Accepted
time: 27ms
memory: 10224kb

input:

20000
1 8750
1 3125
1 7015
1 2404
1 4939
1 5061
1 2895
1 476
1 6769
1 4119
1 1740
1 2436
1 4781
1 4834
1 5429
1 8219
1 9296
1 7730
1 677
1 8200
1 9183
1 4243
1 1037
1 193
1 1654
1 2714
1 7215
1 2229
1 512
1 1117
1 4964
1 6323
1 7761
1 7958
1 3864
1 8624
1 6973
1 8531
1 4265
1 3286
1 4062
1 7241
1 97...

output:

2

result:

ok 1 number(s): "2"

Test #139:

score: 0
Accepted
time: 42ms
memory: 13832kb

input:

20000
1 87255
1 49265
1 38852
1 43386
1 95252
1 93018
1 14253
1 86546
1 54376
1 22800
1 24720
1 35856
1 44489
1 65054
1 95187
1 53727
1 82479
1 84497
1 7137
1 18288
1 43159
1 54171
1 47242
1 27703
1 79523
1 97491
1 53601
1 32173
1 32632
1 58483
1 20797
1 76460
1 77408
1 92857
1 54392
1 43126
1 73926...

output:

74593

result:

ok 1 number(s): "74593"

Test #140:

score: 0
Accepted
time: 26ms
memory: 9704kb

input:

20000
1 643
1 773
1 281
1 314
1 262
1 978
1 949
1 764
1 267
1 452
1 231
1 929
1 853
1 277
1 999
1 149
1 270
1 42
1 126
1 264
1 489
1 821
1 350
1 209
1 845
1 564
1 813
1 143
1 977
1 220
1 386
1 111
1 129
1 557
1 12
1 611
1 405
1 409
1 856
1 455
1 563
1 127
1 467
1 843
1 589
1 553
1 803
1 573
1 113
1 ...

output:

2

result:

ok 1 number(s): "2"

Test #141:

score: 0
Accepted
time: 23ms
memory: 10340kb

input:

20000
1 8468
1 3059
1 5318
1 7889
1 9801
1 8107
1 6039
1 2924
1 7995
1 9091
1 6479
1 7570
1 3797
1 2948
1 9947
1 2815
1 5706
1 7964
1 1566
1 2594
1 5035
1 2346
1 6959
1 1215
1 3523
1 356
1 9830
1 2075
1 7804
1 9140
1 9651
1 4532
1 5239
1 7063
1 7624
1 3735
1 649
1 1965
1 2858
1 7656
1 8008
1 3196
1 ...

output:

2

result:

ok 1 number(s): "2"

Test #142:

score: 0
Accepted
time: 42ms
memory: 13764kb

input:

20000
1 98619
1 41521
1 98899
1 67391
1 59001
1 12223
1 29861
1 10764
1 47216
1 47906
1 57095
1 96852
1 68577
1 75267
1 18547
1 96204
1 27970
1 75778
1 90361
1 86717
1 67037
1 94353
1 79806
1 61794
1 13711
1 78103
1 41912
1 21101
1 98249
1 61710
1 21779
1 92386
1 91603
1 60644
1 52814
1 23289
1 8243...

output:

74725

result:

ok 1 number(s): "74725"

Test #143:

score: 0
Accepted
time: 26ms
memory: 9632kb

input:

20000
1 152
1 370
1 491
1 550
1 949
1 865
1 878
1 642
1 230
1 604
1 615
1 686
1 113
1 394
1 158
1 193
1 666
1 989
1 346
1 780
1 337
1 12
1 163
1 335
1 303
1 583
1 562
1 304
1 893
1 414
1 477
1 299
1 424
1 616
1 149
1 556
1 378
1 444
1 877
1 914
1 206
1 473
1 539
1 656
1 580
1 549
1 689
1 153
1 234
1...

output:

2

result:

ok 1 number(s): "2"

Test #144:

score: 0
Accepted
time: 30ms
memory: 10208kb

input:

20000
1 856
1 7112
1 913
1 2376
1 2472
1 3766
1 4223
1 5681
1 6762
1 9089
1 3798
1 2947
1 2921
1 1828
1 2107
1 3442
1 1732
1 6608
1 2966
1 4698
1 7645
1 200
1 8740
1 6294
1 2283
1 2451
1 5782
1 8697
1 167
1 46
1 7888
1 1273
1 2754
1 3783
1 1482
1 7135
1 2238
1 6643
1 9763
1 4712
1 7425
1 1480
1 9961...

output:

2

result:

ok 1 number(s): "2"

Test #145:

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

input:

20000
1 25447
1 9703
1 10758
1 6794
1 49447
1 21251
1 54835
1 41957
1 96418
1 72539
1 14564
1 43025
1 18405
1 61241
1 4011
1 94539
1 78786
1 92173
1 91866
1 59507
1 74800
1 777
1 35595
1 98000
1 48456
1 64901
1 92409
1 50153
1 56522
1 19036
1 21797
1 22764
1 3286
1 93614
1 51537
1 7946
1 55860
1 684...

output:

74635

result:

ok 1 number(s): "74635"

Test #146:

score: 0
Accepted
time: 22ms
memory: 9636kb

input:

20000
1 699
1 215
1 195
1 47
1 522
1 825
1 685
1 566
1 829
1 403
1 505
1 564
1 840
1 328
1 316
1 846
1 310
1 703
1 742
1 924
1 137
1 650
1 969
1 883
1 256
1 487
1 342
1 524
1 140
1 50
1 648
1 771
1 874
1 529
1 166
1 272
1 908
1 895
1 525
1 25
1 528
1 337
1 117
1 934
1 71
1 196
1 983
1 327
1 365
1 37...

output:

2

result:

ok 1 number(s): "2"

Test #147:

score: 0
Accepted
time: 22ms
memory: 10276kb

input:

20000
1 1543
1 2339
1 5126
1 9016
1 216
1 3507
1 3638
1 3117
1 4496
1 126
1 5106
1 6583
1 8809
1 9538
1 2901
1 2838
1 6447
1 3007
1 1053
1 1150
1 6500
1 1774
1 9086
1 7176
1 6797
1 1735
1 5375
1 4910
1 8178
1 2153
1 5386
1 5954
1 4306
1 4928
1 3287
1 9069
1 8916
1 1187
1 9270
1 2360
1 9581
1 6283
1 ...

output:

2

result:

ok 1 number(s): "2"

Test #148:

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

input:

20000
1 80876
1 3523
1 60622
1 69034
1 98863
1 13174
1 11238
1 50925
1 55950
1 85772
1 79257
1 45526
1 82660
1 38767
1 30667
1 61419
1 75166
1 61665
1 5684
1 44740
1 40032
1 60404
1 11042
1 90416
1 20128
1 81840
1 89653
1 53009
1 78217
1 80016
1 2946
1 58939
1 1242
1 16869
1 71313
1 14937
1 57477
1 ...

output:

74649

result:

ok 1 number(s): "74649"

Test #149:

score: 0
Accepted
time: 27ms
memory: 9624kb

input:

20000
1 127
1 850
1 196
1 471
1 286
1 13
1 831
1 671
1 756
1 572
1 82
1 107
1 210
1 609
1 732
1 894
1 857
1 365
1 124
1 11
1 58
1 427
1 111
1 512
1 987
1 323
1 470
1 902
1 561
1 336
1 469
1 178
1 608
1 130
1 830
1 319
1 213
1 501
1 76
1 722
1 797
1 424
1 192
1 813
1 595
1 720
1 64
1 612
1 350
1 98
1...

output:

2

result:

ok 1 number(s): "2"

Test #150:

score: 0
Accepted
time: 31ms
memory: 10216kb

input:

20000
1 1868
1 8285
1 4592
1 8275
1 8157
1 1034
1 7829
1 6119
1 1440
1 6684
1 7529
1 2953
1 9082
1 6374
1 6358
1 6702
1 6966
1 6782
1 6023
1 2159
1 5650
1 97
1 2077
1 6681
1 9344
1 1692
1 4250
1 205
1 5382
1 6708
1 4153
1 4417
1 302
1 7743
1 7524
1 7068
1 5334
1 5257
1 3453
1 9022
1 7681
1 2944
1 55...

output:

2

result:

ok 1 number(s): "2"

Test #151:

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

input:

20000
1 79870
1 4331
1 39517
1 31118
1 56202
1 66855
1 40062
1 85322
1 24502
1 11123
1 7750
1 15864
1 87763
1 68158
1 74082
1 37005
1 747
1 19014
1 11474
1 33139
1 96408
1 70945
1 21166
1 40363
1 99435
1 11511
1 26526
1 43205
1 53734
1 55525
1 66465
1 58313
1 91234
1 65755
1 17511
1 35121
1 75146
1 ...

output:

74637

result:

ok 1 number(s): "74637"

Test #152:

score: 0
Accepted
time: 26ms
memory: 9764kb

input:

20000
1 399
1 478
1 683
1 401
1 163
1 211
1 472
1 630
1 533
1 801
1 332
1 629
1 663
1 309
1 229
1 344
1 772
1 144
1 693
1 514
1 673
1 623
1 668
1 507
1 24
1 716
1 843
1 187
1 925
1 889
1 627
1 597
1 499
1 718
1 817
1 869
1 146
1 958
1 393
1 258
1 326
1 199
1 240
1 282
1 611
1 633
1 800
1 310
1 525
1...

output:

2

result:

ok 1 number(s): "2"

Test #153:

score: 0
Accepted
time: 31ms
memory: 10180kb

input:

20000
1 2194
1 6194
1 6375
1 4915
1 919
1 7375
1 9203
1 7626
1 8473
1 5356
1 9108
1 5080
1 2889
1 6448
1 5743
1 615
1 9423
1 5783
1 3709
1 2517
1 2613
1 242
1 7931
1 9827
1 765
1 3572
1 4458
1 4953
1 6743
1 1622
1 479
1 8496
1 8780
1 6131
1 7620
1 710
1 9430
1 461
1 3174
1 2686
1 2037
1 5910
1 8773
...

output:

2

result:

ok 1 number(s): "2"

Test #154:

score: 0
Accepted
time: 43ms
memory: 13704kb

input:

20000
1 83889
1 34697
1 61631
1 57673
1 82379
1 66354
1 93006
1 47684
1 9190
1 5049
1 17807
1 46490
1 95952
1 97998
1 45112
1 26707
1 94729
1 41617
1 98708
1 6411
1 96198
1 41144
1 87393
1 27953
1 11726
1 91884
1 24306
1 38825
1 93920
1 3691
1 23567
1 5035
1 74028
1 1512
1 50704
1 69697
1 73141
1 49...

output:

74709

result:

ok 1 number(s): "74709"

Test #155:

score: 0
Accepted
time: 27ms
memory: 9688kb

input:

20000
1 106
1 310
1 654
1 495
1 642
1 562
1 797
1 410
1 971
1 217
1 63
1 969
1 370
1 498
1 735
1 559
1 875
1 467
1 20
1 129
1 990
1 840
1 788
1 479
1 36
1 803
1 569
1 136
1 40
1 238
1 837
1 125
1 335
1 554
1 233
1 418
1 107
1 670
1 225
1 448
1 243
1 862
1 70
1 702
1 121
1 169
1 610
1 771
1 739
1 111...

output:

2

result:

ok 1 number(s): "2"

Test #156:

score: 0
Accepted
time: 30ms
memory: 10264kb

input:

20000
1 877
1 3942
1 9222
1 5210
1 4916
1 9129
1 137
1 7242
1 3165
1 759
1 6923
1 7463
1 1598
1 2952
1 3868
1 8450
1 8290
1 3432
1 272
1 6720
1 712
1 4054
1 2321
1 2301
1 3201
1 7734
1 9435
1 7924
1 8405
1 8079
1 6814
1 4857
1 5663
1 6462
1 6864
1 8415
1 9885
1 8769
1 8648
1 3618
1 7617
1 6493
1 403...

output:

2

result:

ok 1 number(s): "2"

Test #157:

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

input:

20000
1 63945
1 90919
1 4571
1 98340
1 50926
1 89760
1 79496
1 61812
1 93978
1 40498
1 16643
1 62466
1 93365
1 48391
1 55577
1 93446
1 86671
1 60775
1 16377
1 20893
1 60634
1 24772
1 33689
1 3689
1 21099
1 83023
1 93488
1 50831
1 36508
1 59264
1 23162
1 13720
1 70989
1 21746
1 63224
1 2608
1 59967
1...

output:

74628

result:

ok 1 number(s): "74628"

Test #158:

score: 0
Accepted
time: 26ms
memory: 9608kb

input:

20000
1 283
1 616
1 169
1 603
1 415
1 858
1 677
1 36
1 989
1 857
1 665
1 212
1 540
1 696
1 495
1 431
1 662
1 320
1 171
1 448
1 249
1 194
1 867
1 354
1 839
1 967
1 277
1 149
1 553
1 25
1 958
1 175
1 783
1 251
1 821
1 779
1 629
1 875
1 211
1 137
1 777
1 764
1 961
1 834
1 143
1 120
1 555
1 294
1 486
1 ...

output:

2

result:

ok 1 number(s): "2"

Test #159:

score: 0
Accepted
time: 26ms
memory: 10276kb

input:

20000
1 5496
1 1069
1 3821
1 9929
1 5900
1 7145
1 5392
1 5572
1 2747
1 4474
1 3990
1 2260
1 7882
1 6637
1 8814
1 7729
1 7280
1 4100
1 9591
1 4325
1 6664
1 1410
1 4312
1 8382
1 3363
1 5632
1 27
1 3231
1 1459
1 7484
1 6830
1 79
1 8466
1 6357
1 7553
1 2776
1 6633
1 5584
1 4362
1 6921
1 121
1 8598
1 52
...

output:

2

result:

ok 1 number(s): "2"

Test #160:

score: 0
Accepted
time: 42ms
memory: 13708kb

input:

20000
1 28706
1 78273
1 48735
1 21400
1 37772
1 6046
1 47249
1 98109
1 9600
1 78468
1 25021
1 75947
1 40512
1 49147
1 74296
1 5804
1 56819
1 74798
1 98588
1 43084
1 15717
1 98894
1 27366
1 10495
1 14212
1 51600
1 93014
1 24955
1 12228
1 7658
1 67186
1 76825
1 30940
1 60410
1 62851
1 85560
1 74791
1 ...

output:

74622

result:

ok 1 number(s): "74622"

Test #161:

score: 0
Accepted
time: 26ms
memory: 9764kb

input:

20000
1 519
1 316
1 290
1 619
1 531
1 822
1 286
1 293
1 475
1 841
1 26
1 434
1 719
1 345
1 279
1 679
1 281
1 350
1 353
1 375
1 953
1 339
1 921
1 535
1 170
1 762
1 158
1 210
1 258
1 623
1 487
1 221
1 414
1 360
1 362
1 772
1 172
1 99
1 977
1 532
1 566
1 768
1 648
1 895
1 494
1 723
1 744
1 19
1 261
1 3...

output:

2

result:

ok 1 number(s): "2"

Test #162:

score: 0
Accepted
time: 31ms
memory: 10228kb

input:

20000
1 3524
1 8304
1 1216
1 9820
1 8264
1 5655
1 8023
1 22
1 258
1 3199
1 550
1 6399
1 7587
1 7769
1 2983
1 8449
1 3551
1 5386
1 1641
1 2397
1 7006
1 4173
1 2831
1 5831
1 3518
1 4254
1 3135
1 4582
1 143
1 543
1 900
1 3093
1 5686
1 438
1 8205
1 4325
1 3691
1 5229
1 1803
1 3289
1 7994
1 6977
1 7527
1...

output:

2

result:

ok 1 number(s): "2"

Test #163:

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

input:

20000
1 99036
1 27857
1 28502
1 1859
1 50896
1 24055
1 96497
1 92035
1 81519
1 63796
1 32370
1 83509
1 68888
1 73777
1 76119
1 38102
1 71144
1 85819
1 48098
1 98820
1 75941
1 85955
1 94425
1 58946
1 54231
1 44191
1 23367
1 96183
1 50441
1 59687
1 86360
1 48143
1 82637
1 41560
1 9633
1 60600
1 74613
...

output:

74618

result:

ok 1 number(s): "74618"

Test #164:

score: 0
Accepted
time: 26ms
memory: 9692kb

input:

20000
1 535
1 48
1 385
1 374
1 896
1 583
1 930
1 142
1 214
1 731
1 305
1 612
1 138
1 335
1 768
1 526
1 617
1 925
1 77
1 777
1 434
1 338
1 969
1 331
1 937
1 751
1 684
1 199
1 808
1 279
1 476
1 129
1 851
1 464
1 566
1 797
1 423
1 890
1 172
1 344
1 769
1 986
1 680
1 618
1 860
1 539
1 602
1 151
1 418
1 ...

output:

2

result:

ok 1 number(s): "2"

Test #165:

score: 0
Accepted
time: 30ms
memory: 10180kb

input:

20000
1 226
1 2284
1 8750
1 5044
1 7355
1 1845
1 8717
1 465
1 5267
1 391
1 8537
1 2245
1 474
1 4348
1 6600
1 9410
1 5679
1 3356
1 5687
1 2059
1 4250
1 2950
1 8982
1 3481
1 6611
1 6142
1 5367
1 9418
1 2264
1 6697
1 2019
1 8605
1 9115
1 9330
1 7445
1 2983
1 6530
1 4585
1 4780
1 3281
1 8230
1 2159
1 31...

output:

2

result:

ok 1 number(s): "2"

Test #166:

score: 0
Accepted
time: 42ms
memory: 13684kb

input:

20000
1 50615
1 7735
1 11199
1 63654
1 95608
1 24458
1 96776
1 72420
1 42344
1 2754
1 88451
1 38655
1 15324
1 57193
1 57269
1 25252
1 14478
1 59502
1 12043
1 1155
1 2906
1 24802
1 3508
1 12112
1 23810
1 45660
1 38627
1 74723
1 28107
1 42582
1 86126
1 42521
1 45502
1 6925
1 55794
1 37265
1 46152
1 39...

output:

74716

result:

ok 1 number(s): "74716"

Test #167:

score: 0
Accepted
time: 22ms
memory: 11064kb

input:

50000
1 27
1 236
1 125
1 634
1 183
1 503
1 100
1 801
1 620
1 869
1 337
1 769
1 856
1 648
1 812
1 361
1 343
1 994
1 980
1 930
1 519
1 61
1 911
1 876
1 846
1 308
1 246
1 54
1 270
1 135
1 702
1 74
1 808
1 459
1 768
1 990
1 909
1 264
1 169
1 596
1 967
1 505
1 387
1 242
1 526
1 976
1 738
1 59
1 548
1 951...

output:

2

result:

ok 1 number(s): "2"

Test #168:

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

input:

50000
1 9901
1 7365
1 9975
1 5779
1 7391
1 9641
1 7580
1 1937
1 7675
1 5834
1 8582
1 3716
1 2069
1 5597
1 4660
1 5996
1 1590
1 6509
1 1801
1 7980
1 4042
1 7798
1 635
1 2044
1 5811
1 5946
1 4901
1 5480
1 2388
1 3296
1 8245
1 9744
1 6214
1 2144
1 383
1 2342
1 7190
1 5832
1 6872
1 1394
1 6021
1 2586
1 ...

output:

2

result:

ok 1 number(s): "2"

Test #169:

score: 0
Accepted
time: 35ms
memory: 13556kb

input:

50000
1 78658
1 49
1 7589
1 44791
1 95484
1 37695
1 46444
1 2898
1 40174
1 99028
1 41590
1 22258
1 39990
1 86493
1 81572
1 33750
1 49690
1 28460
1 43902
1 53442
1 22306
1 42388
1 50989
1 57563
1 42490
1 13456
1 48512
1 19791
1 530
1 5309
1 56743
1 96011
1 65821
1 33723
1 86523
1 48226
1 3925
1 81072...

output:

2

result:

ok 1 number(s): "2"

Test #170:

score: 0
Accepted
time: 22ms
memory: 10912kb

input:

50000
1 514
1 9
1 333
1 629
1 297
1 760
1 337
1 705
1 942
1 415
1 2
1 356
1 436
1 962
1 317
1 867
1 666
1 661
1 376
1 239
1 620
1 727
1 234
1 319
1 817
1 101
1 15
1 116
1 26
1 338
1 782
1 47
1 804
1 178
1 710
1 844
1 86
1 857
1 313
1 955
1 562
1 367
1 21
1 789
1 12
1 310
1 762
1 733
1 919
1 44
1 246...

output:

2

result:

ok 1 number(s): "2"

Test #171:

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

input:

50000
1 8868
1 8665
1 1224
1 2796
1 3290
1 7920
1 7078
1 1076
1 1434
1 7137
1 8257
1 6535
1 681
1 3669
1 4092
1 6062
1 5726
1 6168
1 626
1 9495
1 1682
1 1082
1 5583
1 9492
1 1319
1 8383
1 5158
1 7165
1 1854
1 5839
1 7034
1 3113
1 6543
1 1526
1 9861
1 2457
1 3573
1 3781
1 3924
1 4142
1 5519
1 6863
1 ...

output:

2

result:

ok 1 number(s): "2"

Test #172:

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

input:

50000
1 98253
1 97232
1 4074
1 18595
1 74002
1 81681
1 45859
1 5139
1 96481
1 78007
1 65262
1 68828
1 52249
1 38911
1 81748
1 92725
1 82473
1 19899
1 60782
1 17995
1 88118
1 43952
1 12074
1 6844
1 70041
1 47193
1 18733
1 35421
1 17983
1 91522
1 57036
1 20949
1 70919
1 82637
1 3025
1 75007
1 17032
1 ...

output:

44632

result:

ok 1 number(s): "44632"

Test #173:

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

input:

50000
1 590
1 323
1 388
1 273
1 74
1 777
1 641
1 869
1 227
1 975
1 132
1 30
1 158
1 196
1 612
1 874
1 394
1 163
1 97
1 947
1 742
1 511
1 519
1 747
1 711
1 443
1 374
1 804
1 676
1 3
1 352
1 103
1 661
1 236
1 405
1 504
1 753
1 489
1 263
1 823
1 926
1 47
1 999
1 936
1 396
1 330
1 350
1 940
1 970
1 246
...

output:

2

result:

ok 1 number(s): "2"

Test #174:

score: 0
Accepted
time: 25ms
memory: 11580kb

input:

50000
1 4739
1 3019
1 1581
1 2215
1 7189
1 9955
1 7728
1 9482
1 8951
1 7895
1 1929
1 5120
1 5308
1 658
1 613
1 3549
1 3449
1 9555
1 4131
1 523
1 2648
1 2251
1 2343
1 614
1 4261
1 8323
1 2553
1 1247
1 2340
1 2995
1 7300
1 6921
1 9609
1 716
1 9831
1 1039
1 14
1 8864
1 9031
1 12
1 6113
1 4852
1 6619
1 ...

output:

2

result:

ok 1 number(s): "2"

Test #175:

score: 0
Accepted
time: 27ms
memory: 13592kb

input:

50000
1 80551
1 24461
1 42432
1 42900
1 93592
1 99669
1 21303
1 95303
1 1564
1 3892
1 10437
1 98267
1 69101
1 63030
1 96118
1 65023
1 88104
1 5391
1 4792
1 2280
1 75245
1 90581
1 97984
1 42671
1 78946
1 2210
1 81987
1 88591
1 7760
1 15795
1 5149
1 89608
1 78660
1 94219
1 5261
1 39807
1 74767
1 16145...

output:

2

result:

ok 1 number(s): "2"

Test #176:

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

input:

50000
1 210
1 750
1 67
1 133
1 949
1 806
1 508
1 846
1 41
1 89
1 809
1 795
1 170
1 278
1 234
1 852
1 496
1 390
1 328
1 220
1 113
1 726
1 178
1 419
1 405
1 577
1 27
1 901
1 489
1 284
1 801
1 17
1 181
1 73
1 592
1 292
1 734
1 76
1 125
1 651
1 4
1 369
1 164
1 276
1 829
1 844
1 235
1 142
1 865
1 127
1 5...

output:

2

result:

ok 1 number(s): "2"

Test #177:

score: 0
Accepted
time: 22ms
memory: 11708kb

input:

50000
1 6383
1 4744
1 5944
1 2922
1 9406
1 8231
1 6130
1 4064
1 4632
1 8568
1 5457
1 3478
1 3820
1 2248
1 553
1 5962
1 6703
1 968
1 6191
1 9153
1 1144
1 7918
1 9405
1 2098
1 7300
1 3250
1 8561
1 9271
1 1507
1 6001
1 494
1 2255
1 4569
1 686
1 2377
1 9263
1 8286
1 9468
1 1453
1 4412
1 1727
1 7765
1 76...

output:

2

result:

ok 1 number(s): "2"

Test #178:

score: 0
Accepted
time: 30ms
memory: 13500kb

input:

50000
1 28928
1 63034
1 78309
1 60553
1 3289
1 70644
1 82303
1 67364
1 17505
1 89227
1 4777
1 40124
1 91566
1 79772
1 32945
1 6936
1 48490
1 59418
1 44093
1 35767
1 16914
1 21420
1 49700
1 13193
1 51416
1 22348
1 61872
1 97649
1 67809
1 6313
1 87266
1 46186
1 26151
1 39494
1 25710
1 86206
1 31256
1 ...

output:

2

result:

ok 1 number(s): "2"

Test #179:

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

input:

50000
1 469
1 325
1 922
1 463
1 616
1 641
1 571
1 705
1 748
1 888
1 578
1 668
1 740
1 774
1 510
1 652
1 51
1 719
1 227
1 656
1 509
1 79
1 39
1 157
1 44
1 939
1 877
1 59
1 836
1 806
1 173
1 406
1 390
1 805
1 906
1 670
1 569
1 355
1 594
1 951
1 212
1 458
1 250
1 734
1 32
1 384
1 674
1 935
1 175
1 207
...

output:

2

result:

ok 1 number(s): "2"

Test #180:

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

input:

50000
1 4895
1 2507
1 4458
1 1631
1 7941
1 6015
1 4214
1 1783
1 9555
1 2511
1 283
1 32
1 1239
1 5690
1 6850
1 20
1 5604
1 2164
1 1062
1 9361
1 5889
1 3317
1 7641
1 6087
1 5945
1 1864
1 4159
1 6044
1 5674
1 4797
1 480
1 1675
1 5766
1 2343
1 4043
1 2448
1 1684
1 6958
1 9774
1 3470
1 7071
1 4941
1 4335...

output:

2

result:

ok 1 number(s): "2"

Test #181:

score: 0
Accepted
time: 30ms
memory: 13596kb

input:

50000
1 74606
1 82791
1 19705
1 73309
1 27713
1 28279
1 99218
1 51294
1 21459
1 58878
1 14344
1 88875
1 27831
1 74281
1 53837
1 48647
1 39074
1 71147
1 78971
1 38356
1 77839
1 50493
1 9837
1 44670
1 97308
1 89400
1 88035
1 40305
1 72395
1 80765
1 32290
1 72958
1 76322
1 23182
1 17682
1 9179
1 59019
...

output:

44661

result:

ok 1 number(s): "44661"

Test #182:

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

input:

50000
1 535
1 8
1 283
1 408
1 304
1 420
1 959
1 508
1 140
1 136
1 153
1 877
1 881
1 694
1 32
1 599
1 873
1 335
1 944
1 245
1 642
1 5
1 594
1 460
1 686
1 600
1 970
1 363
1 692
1 130
1 592
1 705
1 813
1 603
1 392
1 207
1 568
1 261
1 482
1 890
1 726
1 744
1 298
1 771
1 830
1 537
1 870
1 690
1 106
1 74
...

output:

2

result:

ok 1 number(s): "2"

Test #183:

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

input:

50000
1 9679
1 6914
1 4747
1 297
1 5469
1 7500
1 2062
1 5575
1 4891
1 4848
1 7771
1 2133
1 1107
1 1780
1 7176
1 9967
1 2758
1 9216
1 4415
1 8650
1 8534
1 8241
1 9053
1 508
1 6892
1 5080
1 9636
1 3919
1 2483
1 2457
1 1449
1 3074
1 1707
1 765
1 2198
1 6055
1 5511
1 352
1 4313
1 9510
1 7215
1 51
1 4596...

output:

2

result:

ok 1 number(s): "2"

Test #184:

score: 0
Accepted
time: 35ms
memory: 13516kb

input:

50000
1 80078
1 61829
1 90054
1 39607
1 5389
1 53644
1 6997
1 76797
1 86056
1 35225
1 89556
1 54827
1 11689
1 59418
1 97216
1 31123
1 20223
1 27109
1 156
1 4908
1 84351
1 66577
1 73995
1 45935
1 15806
1 48154
1 90071
1 25884
1 120
1 67840
1 5997
1 55251
1 36365
1 56968
1 32767
1 25852
1 94
1 34874
1...

output:

2

result:

ok 1 number(s): "2"

Test #185:

score: 0
Accepted
time: 22ms
memory: 10944kb

input:

50000
1 346
1 322
1 167
1 708
1 311
1 632
1 428
1 876
1 819
1 643
1 823
1 212
1 882
1 797
1 463
1 93
1 978
1 112
1 826
1 351
1 937
1 191
1 529
1 417
1 121
1 250
1 281
1 589
1 507
1 606
1 587
1 713
1 472
1 595
1 564
1 727
1 602
1 84
1 814
1 877
1 377
1 3
1 533
1 166
1 871
1 506
1 403
1 488
1 893
1 78...

output:

2

result:

ok 1 number(s): "2"

Test #186:

score: 0
Accepted
time: 25ms
memory: 11600kb

input:

50000
1 2401
1 5936
1 8175
1 9587
1 8717
1 6342
1 7429
1 4504
1 4303
1 8872
1 7319
1 9354
1 2975
1 1565
1 6663
1 6284
1 3099
1 3924
1 4621
1 4326
1 7651
1 4222
1 3250
1 4772
1 9020
1 4145
1 1431
1 5909
1 6606
1 1527
1 6620
1 2141
1 1702
1 1437
1 9721
1 5379
1 4597
1 9524
1 3704
1 7140
1 8590
1 2132
...

output:

2

result:

ok 1 number(s): "2"

Test #187:

score: 0
Accepted
time: 27ms
memory: 13504kb

input:

50000
1 37725
1 11884
1 83165
1 98473
1 58643
1 91194
1 21588
1 19754
1 27472
1 26731
1 50559
1 44382
1 38521
1 86674
1 98213
1 67722
1 5462
1 92931
1 20593
1 4405
1 41042
1 78679
1 70672
1 5960
1 81694
1 72588
1 95764
1 92661
1 73774
1 82339
1 63764
1 47085
1 18234
1 58753
1 90378
1 93471
1 54926
1...

output:

44619

result:

ok 1 number(s): "44619"

Test #188:

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

input:

50000
1 619
1 158
1 235
1 687
1 41
1 180
1 782
1 541
1 563
1 373
1 380
1 9
1 236
1 971
1 569
1 264
1 201
1 624
1 285
1 309
1 758
1 958
1 526
1 804
1 266
1 125
1 564
1 47
1 734
1 488
1 36
1 37
1 17
1 112
1 710
1 366
1 327
1 168
1 335
1 192
1 437
1 159
1 48
1 237
1 519
1 777
1 628
1 227
1 771
1 990
1 ...

output:

2

result:

ok 1 number(s): "2"

Test #189:

score: 0
Accepted
time: 22ms
memory: 11592kb

input:

50000
1 1155
1 8630
1 5847
1 3593
1 9294
1 2897
1 3694
1 1034
1 9247
1 719
1 8734
1 7386
1 4035
1 1419
1 6822
1 9560
1 6574
1 5684
1 6090
1 9220
1 8132
1 7950
1 1043
1 8227
1 2977
1 5183
1 125
1 782
1 6514
1 1570
1 2424
1 5155
1 6538
1 2615
1 4328
1 8563
1 7854
1 3649
1 9285
1 1587
1 6281
1 902
1 20...

output:

2

result:

ok 1 number(s): "2"

Test #190:

score: 0
Accepted
time: 30ms
memory: 13536kb

input:

50000
1 68440
1 28879
1 25857
1 30828
1 63388
1 37736
1 30684
1 75546
1 20909
1 80338
1 65569
1 42509
1 40584
1 18788
1 5444
1 40261
1 81820
1 40548
1 87344
1 25428
1 589
1 88881
1 20194
1 24192
1 14355
1 43354
1 93068
1 38181
1 85241
1 76485
1 80628
1 85233
1 41086
1 26537
1 3282
1 91911
1 85463
1 ...

output:

2

result:

ok 1 number(s): "2"

Test #191:

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

input:

50000
1 721
1 132
1 369
1 364
1 383
1 444
1 322
1 373
1 876
1 155
1 124
1 561
1 187
1 557
1 397
1 797
1 195
1 466
1 600
1 422
1 737
1 728
1 201
1 544
1 692
1 800
1 731
1 927
1 584
1 906
1 362
1 764
1 288
1 513
1 83
1 180
1 590
1 406
1 88
1 999
1 576
1 745
1 861
1 714
1 482
1 400
1 723
1 380
1 694
1 ...

output:

2

result:

ok 1 number(s): "2"

Test #192:

score: 0
Accepted
time: 22ms
memory: 11680kb

input:

50000
1 214
1 3333
1 8712
1 1072
1 708
1 2543
1 1792
1 6801
1 1294
1 4651
1 7585
1 4511
1 7584
1 2842
1 8378
1 4989
1 122
1 3311
1 907
1 6402
1 1550
1 3619
1 5370
1 1862
1 4739
1 7874
1 5774
1 1369
1 1877
1 1292
1 1415
1 8509
1 1890
1 1477
1 4628
1 4823
1 1086
1 692
1 3115
1 4465
1 7936
1 2968
1 322...

output:

2

result:

ok 1 number(s): "2"

Test #193:

score: 0
Accepted
time: 31ms
memory: 13584kb

input:

50000
1 31171
1 63778
1 27154
1 19068
1 71477
1 771
1 484
1 12161
1 62160
1 54343
1 48724
1 67142
1 15978
1 17985
1 12481
1 40701
1 36812
1 61019
1 220
1 21001
1 74769
1 33012
1 54798
1 39969
1 91243
1 3229
1 98447
1 99346
1 12510
1 90203
1 74256
1 73626
1 56195
1 72393
1 42290
1 67182
1 56967
1 188...

output:

44704

result:

ok 1 number(s): "44704"

Test #194:

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

input:

50000
1 493
1 821
1 567
1 105
1 282
1 626
1 323
1 328
1 679
1 537
1 776
1 157
1 283
1 913
1 900
1 385
1 741
1 395
1 603
1 472
1 171
1 548
1 571
1 192
1 20
1 942
1 767
1 205
1 598
1 87
1 901
1 96
1 176
1 608
1 888
1 883
1 497
1 159
1 694
1 310
1 648
1 125
1 722
1 910
1 241
1 665
1 75
1 872
1 214
1 69...

output:

2

result:

ok 1 number(s): "2"

Test #195:

score: 0
Accepted
time: 25ms
memory: 11684kb

input:

50000
1 3260
1 4642
1 252
1 8192
1 4817
1 724
1 2833
1 2401
1 906
1 4599
1 8433
1 1901
1 5550
1 145
1 5160
1 2045
1 1835
1 7963
1 8082
1 9803
1 3761
1 2498
1 9474
1 3237
1 2259
1 119
1 7886
1 8208
1 9594
1 6176
1 528
1 7459
1 3073
1 6309
1 2391
1 7432
1 2682
1 819
1 932
1 7534
1 1911
1 4093
1 6174
1...

output:

2

result:

ok 1 number(s): "2"

Test #196:

score: 0
Accepted
time: 31ms
memory: 13496kb

input:

50000
1 34890
1 2996
1 48106
1 23209
1 94932
1 24525
1 23110
1 21306
1 94613
1 74631
1 83236
1 47609
1 44984
1 17016
1 67948
1 15013
1 50210
1 53643
1 67610
1 25781
1 28230
1 86495
1 88285
1 18511
1 91247
1 18950
1 78457
1 76370
1 29562
1 64902
1 23109
1 10893
1 79289
1 78107
1 4366
1 82277
1 17393
...

output:

2

result:

ok 1 number(s): "2"

Test #197:

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

input:

50000
1 949
1 696
1 377
1 675
1 958
1 549
1 751
1 305
1 804
1 287
1 430
1 244
1 147
1 39
1 108
1 594
1 805
1 911
1 558
1 417
1 441
1 229
1 595
1 169
1 887
1 520
1 824
1 196
1 746
1 836
1 845
1 374
1 263
1 396
1 60
1 920
1 70
1 128
1 709
1 202
1 76
1 436
1 319
1 131
1 692
1 492
1 68
1 812
1 745
1 661...

output:

2

result:

ok 1 number(s): "2"

Test #198:

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

input:

50000
1 4356
1 8765
1 4818
1 2150
1 1748
1 1375
1 9329
1 8600
1 2191
1 3297
1 4268
1 6532
1 9611
1 991
1 9292
1 5765
1 9024
1 5782
1 108
1 8365
1 8588
1 6120
1 7530
1 4926
1 7631
1 8205
1 3818
1 5906
1 5471
1 4252
1 7987
1 8707
1 5558
1 3126
1 4943
1 3955
1 8287
1 2780
1 8767
1 8582
1 5708
1 3204
1 ...

output:

2

result:

ok 1 number(s): "2"

Test #199:

score: 0
Accepted
time: 27ms
memory: 13668kb

input:

50000
1 23139
1 21643
1 6751
1 90168
1 84208
1 1418
1 2583
1 90349
1 96048
1 27866
1 42726
1 53643
1 1608
1 2704
1 45436
1 34180
1 70515
1 39867
1 24479
1 38205
1 19681
1 1527
1 19366
1 54992
1 70611
1 55739
1 11039
1 55819
1 65857
1 57772
1 17161
1 39952
1 15028
1 1159
1 18491
1 82739
1 52076
1 719...

output:

2

result:

ok 1 number(s): "2"

Test #200:

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

input:

100000
1 1
1 2
1 2
1 1
1 2
1 1
1 2
1 2
1 2
1 2
1 1
1 2
1 1
1 1
1 2
1 1
1 1
1 1
1 2
1 1
1 2
1 2
1 1
1 1
1 1
1 2
1 1
1 2
1 1
1 1
1 1
1 2
1 2
1 2
1 1
1 1
1 2
1 2
1 1
1 1
1 2
1 1
1 2
1 1
1 2
1 1
1 2
1 1
1 2
1 2
1 2
1 1
1 1
1 1
1 2
1 1
1 1
1 2
1 2
1 1
1 2
1 1
1 1
1 2
1 1
1 1
1 1
1 1
1 1
1 2
1 1
1 1
1 2
1...

output:

2

result:

ok 1 number(s): "2"

Test #201:

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

input:

100000
1 3
1 2
1 1
1 1
1 2
1 3
1 1
1 1
1 1
1 2
1 3
1 1
1 1
1 2
1 1
1 2
1 2
1 2
1 3
1 1
1 1
1 2
1 1
1 2
1 2
1 1
1 2
1 1
1 1
1 3
1 2
1 2
1 2
1 3
1 3
1 3
1 1
1 1
1 2
1 3
1 3
1 2
1 2
1 1
1 3
1 3
1 1
1 1
1 1
1 1
1 1
1 2
1 2
1 2
1 3
1 2
1 2
1 2
1 1
1 3
1 2
1 3
1 3
1 2
1 3
1 3
1 3
1 1
1 3
1 1
1 1
1 2
1 3
1...

output:

2

result:

ok 1 number(s): "2"

Test #202:

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

input:

100000
1 1
1 5
1 2
1 3
1 4
1 3
1 1
1 3
1 2
1 5
1 3
1 1
1 2
1 1
1 3
1 3
1 4
1 1
1 5
1 2
1 1
1 4
1 5
1 3
1 1
1 3
1 5
1 5
1 1
1 4
1 1
1 4
1 2
1 1
1 2
1 2
1 5
1 3
1 2
1 5
1 1
1 1
1 3
1 4
1 2
1 4
1 2
1 5
1 3
1 4
1 4
1 3
1 3
1 5
1 3
1 5
1 3
1 2
1 5
1 5
1 4
1 2
1 2
1 3
1 3
1 4
1 3
1 4
1 3
1 3
1 3
1 5
1 3
1...

output:

2

result:

ok 1 number(s): "2"

Test #203:

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

input:

100000
1 3
1 2
1 1
1 9
1 8
1 5
1 10
1 4
1 2
1 7
1 8
1 6
1 3
1 2
1 2
1 5
1 5
1 5
1 3
1 10
1 5
1 1
1 3
1 7
1 9
1 2
1 2
1 2
1 9
1 4
1 2
1 8
1 3
1 6
1 10
1 10
1 3
1 3
1 10
1 1
1 3
1 8
1 10
1 5
1 10
1 6
1 6
1 6
1 7
1 3
1 7
1 9
1 5
1 7
1 6
1 5
1 6
1 1
1 6
1 10
1 4
1 2
1 5
1 7
1 10
1 4
1 7
1 3
1 5
1 8
1 5
...

output:

2

result:

ok 1 number(s): "2"

Test #204:

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

input:

100000
1 5
1 57
1 13
1 49
1 90
1 33
1 26
1 21
1 66
1 16
1 14
1 6
1 77
1 76
1 36
1 2
1 97
1 72
1 18
1 31
1 45
1 93
1 86
1 87
1 9
1 8
1 55
1 61
1 71
1 43
1 59
1 12
1 94
1 44
1 29
1 65
1 42
1 99
1 40
1 56
1 92
1 19
1 30
1 62
1 64
1 20
1 37
1 32
1 96
1 91
1 1
1 73
1 79
1 89
1 38
1 10
1 58
1 28
1 15
1 88...

output:

2

result:

ok 1 number(s): "2"

Test #205:

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

input:

100000
1 610
1 545
1 616
1 869
1 991
1 456
1 859
1 427
1 534
1 42
1 680
1 124
1 990
1 681
1 498
1 532
1 339
1 544
1 139
1 465
1 349
1 622
1 602
1 536
1 848
1 943
1 34
1 746
1 655
1 708
1 62
1 386
1 168
1 794
1 644
1 868
1 624
1 23
1 147
1 333
1 911
1 786
1 43
1 25
1 264
1 528
1 963
1 894
1 675
1 82
...

output:

2

result:

ok 1 number(s): "2"

Test #206:

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

input:

100000
1 4624
1 2639
1 1911
1 5501
1 5665
1 2038
1 7155
1 1708
1 5662
1 5578
1 3317
1 1590
1 3794
1 2758
1 9465
1 7396
1 173
1 8853
1 9010
1 3463
1 5652
1 2058
1 4791
1 7905
1 126
1 777
1 4528
1 4505
1 88
1 1867
1 3933
1 7003
1 9058
1 9614
1 6911
1 8182
1 833
1 5811
1 3901
1 2364
1 2699
1 7999
1 704...

output:

2

result:

ok 1 number(s): "2"

Test #207:

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

input:

100000
1 62112
1 87742
1 28222
1 14102
1 44984
1 80074
1 77054
1 60172
1 3487
1 51536
1 11235
1 36003
1 28407
1 81915
1 85704
1 72336
1 2452
1 37322
1 12766
1 73307
1 64481
1 12463
1 73319
1 83329
1 90875
1 40016
1 51964
1 80242
1 48660
1 94665
1 95817
1 8372
1 62065
1 44295
1 47468
1 17182
1 34445
...

output:

2

result:

ok 1 number(s): "2"