QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#396640#8601. Герої та Монстриmonstersqwq100 ✓98ms140612kbC++202.9kb2024-04-22 22:39:442024-04-22 22:39:46

詳細信息

Subtask #1:

score: 3
Accepted

Test #1:

score: 3
Accepted
time: 20ms
memory: 92268kb

input:

5000
1903 4400 1211 1700 2191 4378 4216 4601 2907 2029 3009 1858 4926 2981 2848 1345 689 4704 3137 51 1755 787 4679 1555 496 4259 3989 1122 3983 3966 3493 2869 4203 823 410 3144 738 41 3977 1767 2663 4779 3252 1930 4989 3003 1269 1604 3888 1737 3776 351 1035 4600 3740 1534 4846 2440 3725 838 76 2786...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

result:

ok 5001 numbers

Test #2:

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

input:

5000
47 830 2838 2650 4996 1824 865 2629 29 1135 2703 3815 4646 1142 565 1101 3002 1996 1319 426 2333 4683 1274 420 3343 1648 2806 4480 4895 1438 4760 3064 3523 4767 1879 3250 4142 604 4064 2723 3145 2663 1463 2982 4195 4422 2005 3662 1692 276 1209 4271 1709 1878 1522 2130 2216 2875 4099 2682 4706 1...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

result:

ok 5001 numbers

Test #3:

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

input:

5000
4013 1760 2726 4336 4597 3326 2242 297 977 4208 4047 1444 3596 675 145 4151 4797 2635 1464 1639 2472 4078 1814 465 11 300 3636 2529 4735 32 4937 3342 314 3957 143 1465 1604 3367 162 1919 4882 3462 3322 1966 4086 1397 3651 4367 2407 787 4395 3731 2724 2040 842 4248 1728 4463 1023 3922 3099 3887 ...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

result:

ok 5001 numbers

Test #4:

score: 0
Accepted
time: 59ms
memory: 92148kb

input:

5000
4256 1360 45 1462 4736 2351 1807 2308 3520 1265 357 2847 446 2317 1638 2817 3472 4036 1722 2165 3364 2852 2187 843 516 456 1553 3609 3264 4263 3846 908 1659 4752 920 635 3202 2080 2291 2185 4172 477 4869 462 4376 4255 4666 3686 4094 4619 4531 1406 3519 2850 359 2893 63 2432 522 2117 1168 2282 8...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

result:

ok 5001 numbers

Test #5:

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

input:

5000
4108 1176 3492 1954 2420 2760 3353 3589 3890 666 2108 4731 1318 3414 2786 829 1930 3567 335 594 2483 3142 635 2328 1604 3542 2513 541 4406 2942 2542 1133 2304 641 3856 334 2083 2329 1934 4716 2041 3674 188 1811 3439 3898 4382 1002 362 3724 554 3226 1836 137 368 410 632 1129 4508 2765 854 379 37...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

result:

ok 5001 numbers

Test #6:

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

input:

5000
1353 3491 635 4602 1156 699 1405 4303 4954 1251 1407 1982 2732 4462 761 3370 3383 3963 2174 1933 4839 3884 1633 453 4268 1790 3408 487 4593 4663 1884 2609 2501 4679 4756 3543 2644 68 3556 1390 2240 4121 3363 1144 392 2657 853 3481 4274 3187 3878 4350 122 494 4966 1033 1070 3095 2372 4278 423 24...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

result:

ok 5001 numbers

Test #7:

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

input:

5000
2178 2292 4600 363 3742 2058 2043 637 4433 4144 2768 2191 4705 3614 851 3534 3206 4898 1937 852 1891 2908 1221 3693 1389 2648 4678 2356 2850 4984 3793 2876 2803 3572 4489 595 1236 604 1344 193 2800 3423 3654 689 4734 880 734 1045 2615 4812 582 2389 3661 4349 2294 4886 2589 2459 1644 865 2365 41...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

result:

ok 5001 numbers

Test #8:

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

input:

5000
1081 3555 399 4405 890 144 3498 1382 4744 4341 4417 3580 4546 2961 2818 1751 68 2123 2051 39 984 3756 977 1225 4713 4740 765 309 1199 2559 4298 1838 1671 2207 1625 1764 4636 2920 1083 1182 3535 4715 2437 1997 3322 2889 1411 1685 1276 1357 4931 801 2203 3933 4786 2688 3747 4194 1688 1074 1156 11...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

result:

ok 5001 numbers

Test #9:

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

input:

5000
3491 1219 3234 587 2840 4720 1321 4512 2699 3931 4694 3202 427 2785 1529 3736 4225 730 4842 3467 1346 1477 2884 3270 3140 373 1685 3661 4047 103 725 4043 2578 3672 1452 4941 1955 3068 3871 3122 3533 303 4008 2470 1910 3832 1513 4893 1914 2746 2161 106 4221 4470 3913 4844 3476 4081 1213 1214 219...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

result:

ok 5001 numbers

Test #10:

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

input:

5000
1326 2770 2439 2702 3928 4438 513 1590 4449 4294 4820 381 2898 3027 3665 3731 4593 2308 3597 1153 2009 2982 4079 3656 4214 3071 3526 864 328 3047 331 283 3671 900 2626 3850 2043 2274 690 4147 999 1688 3877 3886 317 1541 1743 4302 2958 1322 1959 4470 2856 4046 604 2484 4669 24 4648 4851 4425 493...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
...

result:

ok 5001 numbers

Subtask #2:

score: 9
Accepted

Test #11:

score: 9
Accepted
time: 39ms
memory: 92228kb

input:

5000
2034 4850 3399 4589 4777 643 1832 1410 3705 2859 3002 1824 2063 2342 2885 1715 2531 2809 1389 1050 3167 374 242 368 4346 1850 3418 4129 4626 2762 1365 4440 3165 857 1042 61 713 2313 4467 2864 29 4725 4959 571 4753 378 4674 1960 1654 21 1704 4401 2068 3375 2092 2086 3004 4179 2865 2619 2873 4755...

output:

1674

result:

ok 1 number(s): "1674"

Test #12:

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

input:

5000
3164 3005 3927 2471 3834 3286 1963 1828 4806 2027 1836 2727 255 3460 849 112 1123 3671 59 4507 214 899 199 2640 4221 551 787 3631 3835 754 3039 115 1952 764 1799 3215 2038 2423 528 4331 4098 4043 4978 3482 4398 217 1501 4836 2499 1943 1769 3370 1627 3263 4820 27 765 992 3093 1065 4427 3073 3717...

output:

1650

result:

ok 1 number(s): "1650"

Test #13:

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

input:

5000
3937 123 4522 2530 2416 2628 183 2053 4490 3976 1469 4794 2772 1313 1671 129 402 1157 3141 3914 260 3997 2245 1008 84 109 2887 2433 1489 4690 2817 858 3442 718 3392 3804 4740 2690 2664 1110 2352 3011 2408 1334 4763 4547 4392 4985 1521 2532 4110 1233 4590 3787 1681 965 729 3871 2979 1547 1302 44...

output:

2520

result:

ok 1 number(s): "2520"

Test #14:

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

input:

5000
4959 1583 1829 3598 687 4953 3347 3771 2772 1821 1316 3698 3225 2922 559 2265 3856 476 4479 3315 2730 619 1226 203 1439 1657 2131 2347 1314 4202 3211 3573 4778 2494 1299 1525 1487 1892 86 1496 4289 1384 2757 1640 1367 2448 307 4762 1083 4143 3953 1592 1603 3533 3184 510 524 1777 2852 1776 453 6...

output:

2496

result:

ok 1 number(s): "2496"

Test #15:

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

input:

5000
3843 764 4390 4144 4885 3595 3144 2051 4735 4609 1049 1828 2591 3055 4680 2425 3651 3928 1384 4337 489 3742 4483 1073 3652 3419 3430 924 3912 1718 4127 3460 3579 1991 938 738 3756 3570 2897 1259 2504 4325 2175 3980 2197 3224 3640 3946 1676 1998 994 2472 261 2525 4278 175 2587 1984 4862 1981 875...

output:

2471

result:

ok 1 number(s): "2471"

Test #16:

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

input:

5000
3174 4007 4271 2224 2582 4317 3900 3368 1949 624 3673 2468 1541 4092 4622 4681 1540 4340 308 3651 763 1218 4075 3243 4736 109 2832 2526 4734 1588 41 101 349 301 1598 3179 3830 3040 3768 4264 2439 1466 2775 3461 3313 1425 2344 3846 2036 4755 1791 810 4916 2957 3297 3130 4791 2160 4737 107 4655 3...

output:

2447

result:

ok 1 number(s): "2447"

Test #17:

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

input:

5000
1510 1208 3421 4648 2976 4143 4896 596 330 2089 1014 2756 3209 749 1999 135 581 1337 3145 1376 1388 3523 3651 4255 4209 4691 576 3256 1972 4556 808 918 1366 3028 996 2368 181 1638 1537 687 547 4629 3766 1440 4044 1286 3988 2086 3446 4609 4299 977 4834 3260 2384 1948 4100 567 647 1338 867 3169 4...

output:

3949

result:

ok 1 number(s): "3949"

Test #18:

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

input:

5000
2373 2968 1535 3837 3598 1425 4465 2526 9 2045 3208 1366 3978 2660 2990 4579 4872 3151 1420 2932 474 4488 2162 3385 498 651 4147 779 4497 4207 3931 1637 4004 4675 3983 4036 2481 3455 1705 707 1156 4268 4509 517 3496 3214 671 3116 4503 1940 3770 3107 350 254 2605 1453 419 3179 117 1661 242 2142 ...

output:

4819

result:

ok 1 number(s): "4819"

Test #19:

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

input:

5000
1464 30 2482 2081 3223 3499 4411 1734 1714 4315 3783 329 3770 554 3708 935 2415 1592 3731 291 2413 2673 236 2625 3001 3370 4002 4011 2656 455 4869 4249 4912 1954 595 560 367 3672 1989 3560 991 2471 830 525 3177 2240 3581 2507 33 2716 4319 1488 4625 2516 1773 2512 2031 4572 1856 1447 3324 3484 3...

output:

4795

result:

ok 1 number(s): "4795"

Test #20:

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

input:

5000
4771 1693 2402 744 2676 2499 905 178 3584 2951 1591 295 1139 4603 1237 608 803 2496 3032 565 886 758 1798 1543 4191 605 2303 4196 1009 222 4925 4187 4906 1486 304 62 359 2646 959 2107 527 741 1569 2046 3438 441 2606 1311 4010 930 3850 4174 2898 1387 982 4901 4149 2352 942 4479 1721 4789 536 286...

output:

4028

result:

ok 1 number(s): "4028"

Test #21:

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

input:

5000
3998 139 4491 3750 4102 2149 1521 2002 4315 680 4659 1898 3121 162 4241 1914 3714 674 2159 2862 1685 2324 690 4312 1259 4769 774 3435 2384 2318 969 4310 3832 2287 1977 2887 3810 2440 1826 3919 3281 4125 4415 3886 2333 2782 1029 382 2449 399 1701 4359 1023 1674 4525 3808 4266 2982 331 4631 641 4...

output:

1

result:

ok 1 number(s): "1"

Test #22:

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

input:

5000
1520 4178 2161 1439 2930 3173 3400 715 4453 4073 3268 4169 93 2396 2996 2249 3812 1336 4693 866 4598 3393 2344 3944 1964 1985 740 3557 3672 4681 4290 3761 889 2469 1896 1134 4420 2112 2178 4031 3095 1359 2767 1868 1472 4463 1313 3205 4550 167 2137 3894 391 3333 590 4258 1275 3599 4852 4482 796 ...

output:

3979

result:

ok 1 number(s): "3979"

Test #23:

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

input:

5000
2636 2177 103 712 2572 4357 4535 2319 4994 623 4099 2754 4320 1431 4927 947 513 2922 4502 11 4139 4869 4979 1774 2159 916 3092 4764 735 4564 3933 1098 1558 387 1955 4905 2683 2737 1072 4235 2341 1951 3042 3593 3785 2981 3755 2425 4942 4717 4351 4305 501 3300 3604 813 861 1926 2983 2487 1494 447...

output:

3955

result:

ok 1 number(s): "3955"

Test #24:

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

input:

5000
779 1051 2701 2243 1168 2626 4914 1534 3646 4964 2663 2696 2578 3653 3305 3267 562 1158 654 4451 4020 3789 54 389 4346 1429 3793 1838 4701 1697 1142 4704 4854 2520 3453 2584 4056 371 4553 2650 2309 4370 4416 4139 3548 968 2528 4741 2224 2556 1867 1717 4962 4748 1084 2218 4371 3560 4015 35 3395 ...

output:

4825

result:

ok 1 number(s): "4825"

Test #25:

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

input:

5000
3317 265 1660 2194 3302 992 3883 3266 498 1130 4019 408 1655 4441 4968 1160 1030 34 3017 54 47 2411 2396 846 3430 4896 4423 3197 1100 1598 1225 972 3875 2756 3411 4449 204 146 1920 1928 791 3400 996 2716 3794 1535 4822 2802 1344 3419 3476 1625 1373 975 1990 2440 2239 2203 40 942 3233 603 1045 2...

output:

1

result:

ok 1 number(s): "1"

Test #26:

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

input:

5000
54 1863 637 921 3216 8 1410 4866 3497 1993 2272 4052 4512 2538 4042 4586 2521 2985 3776 2681 2406 2399 2472 3409 2012 446 3615 1639 4876 1448 4853 468 2149 1396 1288 1696 1767 589 4982 1870 3309 1933 4554 134 3927 2546 1563 1910 3745 1180 46 1101 3719 2949 458 3168 3184 763 4099 453 4435 4593 4...

output:

4776

result:

ok 1 number(s): "4776"

Test #27:

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

input:

5000
2010 975 3913 2684 1452 1884 3380 3151 2893 1159 1823 4910 2957 4878 2256 2484 578 376 2732 1008 3325 3565 1030 216 904 4671 2084 3947 226 242 3682 915 3032 3042 4157 2306 3078 4637 3230 3769 4914 2458 4586 4415 3004 3866 2722 718 1681 2338 1927 4996 292 3475 1527 1031 3931 598 820 2036 4801 26...

output:

1

result:

ok 1 number(s): "1"

Test #28:

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

input:

5000
27 4950 1857 1688 2760 4409 3888 1910 3734 4741 2319 3299 300 446 1489 315 1432 2534 4467 2169 1679 3246 4072 4973 334 2445 3367 4326 3674 754 3161 1684 92 4389 1131 2847 913 471 1882 1753 3723 2520 2635 4456 2934 2881 1586 2948 3562 3115 3960 1425 43 4698 97 54 3146 107 4979 1064 2192 2104 600...

output:

1253

result:

ok 1 number(s): "1253"

Test #29:

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

input:

5000
4249 2930 3891 4353 901 1990 4749 1000 4175 1226 4248 1401 3925 1816 1081 2991 2408 2542 849 2183 3272 951 1305 4149 4620 2916 3794 3157 4506 1429 2475 2456 1018 4326 3039 4030 848 3672 4743 2545 3894 762 172 884 3097 2531 4789 877 4599 725 4753 284 1396 3886 2524 3681 4378 946 3251 523 3364 11...

output:

1228

result:

ok 1 number(s): "1228"

Test #30:

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

input:

5000
4475 4056 10 1114 3924 4146 16 4653 3141 1056 4529 1552 2768 4342 2548 4026 2852 1508 3964 4380 3288 2341 1082 2649 2752 3941 1713 1924 2947 2794 1664 924 2861 1700 3074 4381 2102 2155 225 240 3309 22 4726 3613 3945 3736 3636 2053 1102 4745 493 2007 4266 4360 3095 3771 613 1628 139 4915 4460 41...

output:

4570

result:

ok 1 number(s): "4570"

Test #31:

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

input:

5000
4465 4341 1146 3874 2962 1252 1747 4907 2975 2586 4905 566 381 330 4156 2005 75 3657 2030 182 561 2707 910 1007 3173 289 1221 1707 2841 28 2605 1648 85 3856 1468 1142 1058 1354 2245 1135 250 1945 2352 3579 2581 3868 1441 1003 1997 219 1972 3865 694 2992 2921 2871 4911 2787 994 4485 1768 3584 39...

output:

1071

result:

ok 1 number(s): "1071"

Test #32:

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

input:

5000
4580 4605 509 2595 4569 4152 157 1077 2145 1285 1476 454 4061 2462 230 50 885 2795 1638 3014 824 4024 4117 4174 40 3036 444 4823 4709 2298 1244 2187 72 2100 4703 3533 2312 2109 3776 4258 3523 1788 3852 3671 1960 4499 2708 4254 2508 1209 2405 521 4253 1903 3111 2278 3372 3735 4207 1506 4428 1481...

output:

1

result:

ok 1 number(s): "1"

Test #33:

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

input:

5000
3799 4735 1274 4096 2769 4623 3933 4825 2269 1544 721 297 2892 3873 2186 195 1672 4453 1606 2312 739 527 1910 2525 2612 1230 311 2237 4341 4378 4434 4537 2805 3880 4127 1092 2824 3415 4584 3572 3328 3961 1052 1538 872 3209 2306 3376 2394 2387 181 4884 3258 2358 3265 2303 860 830 3177 509 3215 3...

output:

1022

result:

ok 1 number(s): "1022"

Test #34:

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

input:

5000
350 3967 2312 4604 785 3746 2069 1750 763 1502 449 2024 3362 2027 609 2147 4145 661 3447 4375 537 4652 2134 531 2050 955 4419 3338 4942 4758 1599 1746 3102 3204 501 3192 577 3456 1837 622 2225 2676 691 116 3846 1276 875 943 3677 2845 254 4007 270 4574 737 4553 972 1112 1823 4180 1863 1719 2540 ...

output:

997

result:

ok 1 number(s): "997"

Test #35:

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

input:

5000
3109 4136 1449 3647 3117 3156 2102 2766 3359 1349 87 4915 3353 964 38 1717 2852 1319 3128 4315 461 4281 543 616 35 3984 1399 624 3889 2722 3658 4698 2738 779 3542 3985 3934 2994 969 3580 2464 4666 2117 845 4151 2222 2253 1170 2473 3597 3521 687 4892 1529 591 4341 2110 292 1111 3376 2335 1473 47...

output:

1868

result:

ok 1 number(s): "1868"

Test #36:

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

input:

5000
4005 4652 3074 1072 3491 4670 2155 2306 4787 2380 4740 4067 455 400 1283 2501 2485 1310 1277 972 4412 723 834 296 4604 381 3670 3674 4054 3414 568 231 598 1045 4639 4103 3128 667 4306 3526 1293 1882 3684 4384 2445 2519 4965 949 3254 2645 3344 328 3934 3326 3644 746 868 538 3112 2805 1949 3836 3...

output:

1844

result:

ok 1 number(s): "1844"

Test #37:

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

input:

5000
4799 2911 2082 2539 1691 1747 3537 3660 902 4084 1215 4493 2445 2746 4559 3247 2359 160 3823 1512 2199 1688 4038 1172 4876 3389 304 1015 4337 1056 4802 997 3437 2419 3924 4376 2611 4643 1667 3911 2337 678 3766 4930 1342 1352 3611 3032 250 3102 471 3629 3312 4807 2220 3370 1132 1546 1471 4290 16...

output:

3345

result:

ok 1 number(s): "3345"

Test #38:

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

input:

5000
4836 300 3848 682 4967 2506 947 4358 907 2345 3369 4890 2768 4345 3849 7 4419 2875 2365 1421 338 4239 2629 3855 595 1402 4994 1044 1730 4300 3764 2897 4456 3175 4028 1052 86 1974 3648 2939 1332 140 1625 4896 4243 4604 1945 2877 2700 4126 1980 2937 1867 1227 4793 2691 2977 3148 2458 313 1878 454...

output:

3321

result:

ok 1 number(s): "3321"

Test #39:

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

input:

5000
742 4645 2110 622 1497 4179 2015 69 2283 2940 735 344 1611 558 1534 4624 2324 1910 4605 2864 3049 1278 2546 4617 2627 4206 3941 1605 2305 3551 452 3160 3031 420 114 2300 4910 132 4 4399 291 4301 2887 1817 2884 4812 4929 4221 4325 610 4427 2860 1794 545 665 4938 4368 3659 482 302 4634 1208 332 4...

output:

3297

result:

ok 1 number(s): "3297"

Test #40:

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

input:

5000
3707 2273 3749 2767 4969 2862 4181 1439 2393 194 4682 1505 1661 3203 417 1485 1064 2908 3681 4870 1400 4205 4159 1349 3511 1657 113 1418 2370 2067 2432 3584 779 1803 3468 3652 4704 4955 3721 898 568 128 2643 695 783 3834 3541 2163 1261 2467 3849 3464 3018 439 1199 4861 699 926 3351 615 1928 129...

output:

742

result:

ok 1 number(s): "742"

Subtask #3:

score: 6
Accepted

Test #41:

score: 6
Accepted
time: 70ms
memory: 139016kb

input:

5000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

output:

994748608
429378898
422021660
266302003
522435378
48707405
2144726
678815219
140533013
613284916
648265601
217683840
166565886
499391846
936868275
995936044
314638951
774740859
376651350
852169707
556944839
544215045
142967797
833525452
203481130
57698843
653411997
234992791
33891015
301758386
27955...

result:

ok 5001 numbers

Test #42:

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

input:

5000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

output:

519805960
888862050
605474776
572611331
4650591
246529698
568243692
521696829
941999288
582070144
872968012
334175494
139521594
666418537
234505219
201168495
497706439
792495659
964594318
711305533
438737255
991185577
136847552
670411284
396022144
961151244
723731530
711278999
654823053
436791481
97...

result:

ok 5001 numbers

Test #43:

score: 0
Accepted
time: 52ms
memory: 138964kb

input:

5000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

output:

830799326
841304197
644517859
742931412
385429181
274008304
671704515
420682609
708574873
712891973
260109370
705353819
205823562
946846041
141389627
787894900
68755775
9279026
637594359
444690290
464981391
268177228
170307580
576774333
890913473
541483910
621499807
670242107
428364210
140688792
836...

result:

ok 5001 numbers

Test #44:

score: 0
Accepted
time: 71ms
memory: 139020kb

input:

5000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

output:

386199837
288451443
757660642
334323637
656387271
658097689
214347768
52360778
370018656
768191806
461671128
294468463
452844730
496269534
688403393
926815354
758020274
387105723
155014441
387570153
475820784
960347698
647596400
230607238
577403769
627892927
309238218
246887168
928587815
210871910
6...

result:

ok 5001 numbers

Test #45:

score: 0
Accepted
time: 60ms
memory: 139000kb

input:

5000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

output:

837668380
387470608
43680349
469058314
826904443
576761770
804186538
17236588
564499365
42451038
286476803
586748469
82745779
117381386
850363849
753445963
900508497
67789871
550234619
523209847
889947922
94277381
241285945
339678272
40632978
50402931
523190295
448667797
185774242
756921872
17750129...

result:

ok 5001 numbers

Test #46:

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

input:

5000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

output:

975266030
696775034
80604751
121885986
417426872
12603123
507438031
698974563
728560648
40008493
116910971
890271828
685363765
191747868
394941766
576632047
954540885
433604672
893659165
696125906
786948113
458219456
918691457
438650755
109081398
228742111
239880487
562537591
551558496
11689955
8647...

result:

ok 5001 numbers

Test #47:

score: 0
Accepted
time: 60ms
memory: 138952kb

input:

5000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

output:

444269343
658927323
292595552
422505348
194581308
908574950
434492116
311587114
249079305
232658489
114155078
614743772
652701869
801873172
77954743
422553792
985208760
619890048
708519283
308779170
84243998
667515339
103849726
791064394
99933377
856415977
82954336
608439540
232225676
356804179
2020...

result:

ok 5001 numbers

Test #48:

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

input:

5000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

output:

185345277
158677497
478126025
406852273
77449850
95855091
171404633
917780057
99155494
421611572
558042424
567184659
283523548
458174559
764386637
977278472
518929348
394137440
574158700
212691441
916904306
73950456
774611179
868008140
339090159
677450788
756052419
751887328
709215106
389357001
1743...

result:

ok 5001 numbers

Test #49:

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

input:

5000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

output:

171578817
654782753
338734024
43701194
657059301
905198261
882213173
786418824
624544834
303263707
913956039
806265419
239670193
907929665
961027727
320269694
306184482
94636485
365612408
135747927
93552169
281620811
905477823
315296938
366848355
825744374
311649012
425821120
881992110
859677751
941...

result:

ok 5001 numbers

Test #50:

score: 0
Accepted
time: 65ms
memory: 139072kb

input:

5000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

output:

124132879
465534655
262765780
13928731
625305032
182226011
549623433
436828904
336848974
39693111
913313356
313900932
509727059
415970016
385989612
1238923
34835075
204213895
626835530
475422157
35746503
37034357
429328716
47468942
57999575
988892884
465653762
385912584
873516038
427254470
86868970
...

result:

ok 5001 numbers

Test #51:

score: 0
Accepted
time: 68ms
memory: 139084kb

input:

5000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

output:

994760063
550567189
697830738
681183983
179370520
304363605
107344518
963598242
956244827
554912687
540251448
280893592
384997384
421493482
708196985
363374055
890812338
698473785
534856614
936462013
63263075
189117528
337014656
553970
542558246
767016276
936457392
97923300
978531787
79109337
309185...

result:

ok 5001 numbers

Test #52:

score: 0
Accepted
time: 68ms
memory: 139024kb

input:

5000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

output:

478027064
962831114
22209744
396265691
61722035
678415320
618758545
412618496
943991177
300094970
640683896
407076184
70030998
298906681
301352085
489370442
777905737
140709819
594005181
364623835
933475178
534499613
552996984
225551948
817227507
554341667
852182094
53250378
636021625
773419464
1837...

result:

ok 5001 numbers

Test #53:

score: 0
Accepted
time: 67ms
memory: 138936kb

input:

5000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

output:

280520863
78431733
5317903
874523223
568055905
285626270
677830369
103731547
247825889
791212708
173261226
368515984
123785113
445651353
187260560
127449079
553358915
79786003
116996780
543601204
867311537
401109514
657666173
417638354
652803796
260608565
376729645
651118954
487275082
81266960
99751...

result:

ok 5001 numbers

Test #54:

score: 0
Accepted
time: 63ms
memory: 138944kb

input:

5000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

output:

105174182
466376035
556631697
323095846
569717992
161508214
172191679
405986008
140436113
692140580
329234778
3538257
201039664
63841519
987041539
798688038
522543129
63730854
111836485
714482868
658776018
735432951
179000275
593364585
792170946
403072799
100751125
464601083
268007658
780930766
5889...

result:

ok 5001 numbers

Test #55:

score: 0
Accepted
time: 73ms
memory: 138952kb

input:

5000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

output:

638328185
38936257
227017115
179613653
192747823
400179090
539164493
814161489
709997924
312091451
594465524
930455709
267509225
55829142
839978840
672966690
984934594
984891400
692781545
461551033
26355644
91989710
437959457
469733368
800495609
959136572
401405089
93790259
205234293
742493629
41134...

result:

ok 5001 numbers

Test #56:

score: 0
Accepted
time: 60ms
memory: 138992kb

input:

5000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

output:

93996751
380470590
627150936
852910813
650906926
151393672
952391337
61710632
195244116
31154698
779207150
169164926
863654684
644919890
121775567
905241603
479334668
862173929
264016094
524782138
134099329
874653738
398141834
252143002
572418014
329270442
91422782
564713266
140725029
379235205
8433...

result:

ok 5001 numbers

Test #57:

score: 0
Accepted
time: 63ms
memory: 139016kb

input:

5000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

output:

692616666
994472684
537136226
491945877
488219666
638031614
691756360
690026033
519392874
287238618
970913766
502157712
480688145
279119067
916296723
144908871
204932391
291142464
943923550
111184915
855566150
491529048
192742394
576748589
830260642
322273688
91938015
344253279
942653626
44551711
61...

result:

ok 5001 numbers

Test #58:

score: 0
Accepted
time: 63ms
memory: 139072kb

input:

5000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

output:

340289603
58921643
70816464
901620320
925919023
696984315
1945355
704470097
534803268
296845789
378806879
516235175
339957948
252872188
893803786
669312888
867667622
263518868
918096153
874347294
711883883
535437836
704531948
790437710
25695555
394007178
398901184
374004335
197746959
916324676
80338...

result:

ok 5001 numbers

Test #59:

score: 0
Accepted
time: 68ms
memory: 139004kb

input:

5000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

output:

78807498
437661468
654532872
631551641
338610827
815991452
757373000
916306105
619739650
722509144
270322733
934628029
91794885
616523640
227256028
716463478
797217393
745206509
335073662
223741154
363870610
707396547
47798382
611592691
30206430
981113727
853580626
838952894
520997010
155090343
7038...

result:

ok 5001 numbers

Test #60:

score: 0
Accepted
time: 62ms
memory: 139076kb

input:

5000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

output:

858975187
982736107
470163238
276187108
983582050
663777136
230759257
371323362
596192181
289628725
272132496
210880439
363982373
62589163
873791906
116295041
335390465
354875348
951987860
517472461
314659456
423915355
12868282
284569579
521899067
13144372
458494503
932439297
326862142
924542888
406...

result:

ok 5001 numbers

Test #61:

score: 0
Accepted
time: 68ms
memory: 139008kb

input:

5000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

output:

554706205
140917227
200966448
758886440
333219318
674183611
109838889
628525831
728916321
162319126
457759125
646512770
516517172
165855614
62670841
730778542
658828291
168464393
972252589
505097240
794792945
770598578
633565613
884742115
238493161
404418106
739694738
680943587
891765392
435530027
2...

result:

ok 5001 numbers

Test #62:

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

input:

5000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

output:

544928769
976208070
592656255
97838746
876347018
430960921
162044761
584920472
959979121
783123683
8281048
523475699
593709126
484964694
937070149
216897868
226571112
783157872
775182366
514427635
826674594
639546426
355606226
78138765
67233983
693157409
794941188
298297788
378959230
795299796
94416...

result:

ok 5001 numbers

Test #63:

score: 0
Accepted
time: 64ms
memory: 139024kb

input:

5000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

output:

627922050
889376402
296023575
505452075
345484488
831684491
861795925
175937996
76316563
677549212
18317487
232407066
243162976
375070019
163279692
339739124
617216044
604882371
277243632
135900065
76890818
109687476
289444702
559394623
96345268
516980031
106809643
529045935
931852519
760794156
6133...

result:

ok 5001 numbers

Test #64:

score: 0
Accepted
time: 61ms
memory: 138952kb

input:

5000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

output:

170114064
658571458
471428083
966107296
140676079
221632771
239849416
485549399
696232426
305861386
538761090
255757189
127439600
308622435
478822550
284607628
623203889
458478416
321162134
989912307
433003226
508820566
794378297
537648174
749451664
144599132
558276992
936249449
317398488
487449076
...

result:

ok 5001 numbers

Test #65:

score: 0
Accepted
time: 58ms
memory: 140612kb

input:

5000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

output:

903826781
373159799
289078572
728565233
368952863
898294814
618999483
276022980
710598135
87587858
344306047
584587351
987329639
534906560
454266510
206074814
470460358
621389434
307739906
362921843
5939752
210268249
428428189
163193837
322256401
537742279
751493813
224183573
609367564
674967630
451...

result:

ok 5001 numbers

Test #66:

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

input:

5000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

output:

557121006
413383594
13203404
261694010
749816232
281811529
211074309
183139269
698281592
852658037
715251434
885868285
734233129
392472731
168324513
140316999
302722830
977984515
261070912
218827783
945862364
173651507
335046547
959161763
724392257
834128929
517344617
262236964
872951350
377328489
4...

result:

ok 5001 numbers

Test #67:

score: 0
Accepted
time: 62ms
memory: 138944kb

input:

5000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

output:

742089471
595586633
30854447
18006370
252111473
82204934
448012228
508534110
709150226
364667271
785517636
514176325
915121536
217464971
467133822
220443617
653869145
355789010
605019170
504137700
697385237
201352742
471234982
820666207
908158936
815453173
846387415
570322474
574192138
410022738
952...

result:

ok 5001 numbers

Test #68:

score: 0
Accepted
time: 60ms
memory: 139012kb

input:

5000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

output:

860695735
130694819
55148909
155701809
905597424
141694192
169236531
744939798
337472289
547140749
566287463
25434641
678755730
301332153
134881682
259763067
984420862
273391034
458680473
681786689
653991607
288586092
209913555
537924547
115939519
323155776
937725192
302742411
663066143
799856490
31...

result:

ok 5001 numbers

Test #69:

score: 0
Accepted
time: 64ms
memory: 139068kb

input:

5000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

output:

105473876
544990314
917425077
149928833
752137324
169103235
474301641
976625694
219797223
679131497
703349433
776056422
897991175
834286723
988422740
560003670
177874016
958570001
78555228
104972976
93006980
907428298
920795607
256184784
626679873
95262608
466086341
352190581
779508408
545956119
380...

result:

ok 5001 numbers

Test #70:

score: 0
Accepted
time: 98ms
memory: 139028kb

input:

5000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

output:

722637091
484462592
140174815
614460495
601353689
564326045
732197844
832424784
353428517
719860359
325420629
207475100
875424066
459543142
735680471
648951441
542955432
748472909
507851565
159151435
430869010
666504781
934108763
622069291
668326974
820949229
532195362
279486325
847012415
193890042
...

result:

ok 5001 numbers

Subtask #4:

score: 16
Accepted

Test #71:

score: 16
Accepted
time: 2ms
memory: 10020kb

input:

300
127 142 125 327 217 438 162 129 16 370 452 170 418 357 397 446 398 597 5 296 558 159 140 566 433 132 302 565 472 513 477 198 350 467 177 160 272 155 251 440 84 176 387 112 237 578 258 278 26 74 332 6 136 400 367 273 535 146 252 141 11 484 285 465 474 512 373 462 480 207 505 580 114 22 340 42 288...

output:

268091962

result:

ok 1 number(s): "268091962"

Test #72:

score: 0
Accepted
time: 0ms
memory: 10008kb

input:

300
75 246 271 139 176 262 248 399 279 268 155 188 542 475 177 201 41 29 107 467 555 216 134 308 583 278 225 359 162 441 166 179 288 235 490 465 364 356 73 275 260 491 46 96 5 276 526 533 502 593 251 564 135 104 575 223 431 319 181 283 109 362 149 265 34 429 500 307 590 468 95 444 122 442 297 282 22...

output:

608937071

result:

ok 1 number(s): "608937071"

Test #73:

score: 0
Accepted
time: 0ms
memory: 9996kb

input:

300
153 459 260 428 101 245 480 292 91 457 487 574 368 64 421 263 175 588 333 278 381 546 93 259 104 179 16 238 413 177 189 559 129 46 123 340 550 439 148 128 97 44 553 137 592 12 598 571 24 548 485 305 573 251 204 71 520 308 549 321 326 415 359 557 491 521 526 11 387 533 200 50 407 589 380 75 54 23...

output:

398559783

result:

ok 1 number(s): "398559783"

Test #74:

score: 0
Accepted
time: 2ms
memory: 10092kb

input:

300
301 72 161 223 180 157 3 86 88 52 48 257 510 379 286 435 578 236 383 333 491 484 235 535 265 313 328 277 82 284 549 44 599 102 131 370 47 178 541 478 576 464 216 241 22 400 77 389 121 598 532 479 369 552 360 418 503 596 15 542 404 567 35 587 273 577 386 260 412 279 21 561 219 78 457 105 460 419 ...

output:

652953640

result:

ok 1 number(s): "652953640"

Test #75:

score: 0
Accepted
time: 0ms
memory: 10068kb

input:

300
486 100 549 299 303 233 361 520 222 247 582 584 408 463 201 115 14 209 205 203 281 512 358 527 369 536 282 560 234 528 182 300 109 387 156 204 101 54 539 452 283 274 302 92 440 379 9 498 483 472 179 507 231 598 314 116 97 256 325 447 134 184 430 295 370 373 437 257 206 538 543 266 200 190 294 30...

output:

397817158

result:

ok 1 number(s): "397817158"

Test #76:

score: 0
Accepted
time: 2ms
memory: 10048kb

input:

300
331 285 561 45 81 154 562 302 492 165 102 201 454 33 175 591 390 136 23 101 230 152 506 333 442 103 567 537 499 569 364 222 231 115 346 226 352 576 233 137 369 113 580 554 88 371 19 578 423 426 200 456 90 383 47 53 598 303 354 6 568 425 515 463 400 433 566 169 251 260 521 287 206 264 493 236 73 ...

output:

917575670

result:

ok 1 number(s): "917575670"

Test #77:

score: 0
Accepted
time: 0ms
memory: 10008kb

input:

300
176 36 33 121 449 178 10 335 79 141 306 462 372 425 393 472 325 354 157 593 427 327 329 493 424 548 37 339 590 367 466 31 251 45 43 199 6 102 441 565 77 283 149 555 281 546 309 261 544 332 487 516 221 73 381 86 20 358 235 598 574 459 298 46 453 390 92 115 241 259 61 280 504 343 208 484 371 486 2...

output:

368079261

result:

ok 1 number(s): "368079261"

Test #78:

score: 0
Accepted
time: 0ms
memory: 10128kb

input:

300
516 270 523 59 297 34 447 21 125 517 374 95 205 582 165 84 52 146 443 85 347 225 62 316 490 283 333 468 158 511 239 503 92 215 576 405 528 286 416 537 356 579 17 163 185 301 577 97 566 26 593 379 384 193 208 391 267 462 54 242 373 190 182 598 197 159 331 117 83 15 169 438 202 281 592 33 207 221 ...

output:

126430440

result:

ok 1 number(s): "126430440"

Test #79:

score: 0
Accepted
time: 0ms
memory: 10072kb

input:

300
592 587 144 183 365 223 449 318 193 90 131 524 523 13 549 416 349 504 74 38 536 14 143 124 483 216 436 211 388 267 394 328 217 256 29 552 520 237 116 313 586 236 422 314 438 323 146 522 406 7 514 570 432 575 437 539 254 135 153 58 145 12 492 95 32 172 598 269 2 551 87 54 357 450 26 521 173 577 2...

output:

840380815

result:

ok 1 number(s): "840380815"

Test #80:

score: 0
Accepted
time: 2ms
memory: 10024kb

input:

300
192 85 313 267 222 100 213 32 209 195 498 276 9 247 102 23 441 193 86 147 355 600 159 523 113 532 341 70 219 333 566 576 197 69 4 143 489 135 401 156 533 254 199 436 553 398 271 575 251 201 2 248 82 504 565 482 400 332 226 457 52 11 157 208 72 46 60 1 420 598 246 402 118 132 154 475 472 45 403 4...

output:

347978310

result:

ok 1 number(s): "347978310"

Test #81:

score: 0
Accepted
time: 0ms
memory: 10140kb

input:

300
296 548 522 323 360 470 423 286 449 239 67 46 358 26 32 451 230 582 254 578 241 248 556 170 540 463 338 581 535 36 471 401 343 523 40 403 393 173 541 526 575 301 528 21 273 427 421 437 264 190 426 519 280 315 509 373 345 485 212 399 436 321 367 53 179 117 45 513 469 122 546 134 355 598 411 590 4...

output:

844737740

result:

ok 1 number(s): "844737740"

Test #82:

score: 0
Accepted
time: 0ms
memory: 10008kb

input:

300
59 373 212 419 334 304 368 557 439 207 123 413 476 266 92 303 405 562 509 289 138 49 568 193 504 111 315 65 471 254 437 305 527 438 136 498 30 464 543 112 290 171 382 283 202 17 247 157 406 431 18 378 446 258 361 96 182 104 494 451 319 490 268 38 234 547 563 140 70 291 169 295 84 161 153 98 54 2...

output:

512304538

result:

ok 1 number(s): "512304538"

Test #83:

score: 0
Accepted
time: 2ms
memory: 10012kb

input:

300
392 460 349 522 375 85 438 288 471 24 195 223 167 211 254 355 47 582 141 43 361 443 115 22 80 69 106 253 48 263 567 383 73 321 38 90 393 234 347 17 216 518 218 560 179 442 278 387 425 372 388 577 138 529 165 35 166 580 261 135 533 504 269 64 108 159 116 41 398 404 87 266 543 459 358 363 237 30 5...

output:

342542654

result:

ok 1 number(s): "342542654"

Test #84:

score: 0
Accepted
time: 2ms
memory: 10016kb

input:

300
425 287 348 278 490 548 116 520 531 276 367 396 47 293 167 571 583 12 444 118 505 593 19 277 437 465 151 30 103 281 407 586 462 81 139 417 289 256 190 461 192 14 186 463 283 567 470 229 269 101 491 114 120 476 222 91 168 550 565 201 66 5 110 502 231 298 390 450 587 144 145 94 427 228 198 266 209...

output:

832931580

result:

ok 1 number(s): "832931580"

Test #85:

score: 0
Accepted
time: 0ms
memory: 10072kb

input:

300
89 492 430 92 432 527 504 556 114 60 580 414 156 387 459 469 167 240 355 73 307 496 335 119 161 507 103 402 283 192 139 295 65 436 138 71 190 162 409 340 303 389 231 13 531 585 70 293 517 516 341 20 593 403 356 21 218 550 281 250 573 196 443 91 408 513 431 329 27 382 179 90 228 251 327 465 548 2...

output:

888614727

result:

ok 1 number(s): "888614727"

Test #86:

score: 0
Accepted
time: 0ms
memory: 10104kb

input:

300
481 560 98 271 359 171 356 181 473 146 22 403 482 194 137 362 113 563 437 17 452 582 529 574 205 498 305 329 243 339 207 14 486 250 152 11 83 352 64 198 267 166 27 26 571 132 432 172 412 279 545 188 535 289 593 226 395 550 454 100 214 110 409 385 85 526 141 227 249 149 507 328 154 282 54 74 169 ...

output:

399268766

result:

ok 1 number(s): "399268766"

Test #87:

score: 0
Accepted
time: 2ms
memory: 10088kb

input:

300
591 215 440 133 420 442 110 555 511 175 240 252 561 357 20 401 334 592 36 135 198 324 94 139 213 359 190 438 499 557 117 185 374 544 321 141 75 581 229 44 264 422 589 235 424 282 487 258 130 162 78 474 393 514 18 150 158 116 14 257 8 166 105 113 188 339 558 50 509 89 316 192 456 565 65 320 174 2...

output:

76869128

result:

ok 1 number(s): "76869128"

Test #88:

score: 0
Accepted
time: 0ms
memory: 10100kb

input:

300
298 453 390 342 141 456 590 78 121 114 370 437 11 283 223 60 428 66 362 360 455 233 312 466 414 457 140 222 126 73 185 319 589 513 447 568 520 269 413 332 563 352 316 572 418 158 359 164 265 541 227 32 294 53 492 392 63 6 483 385 522 110 446 5 577 461 303 175 309 159 289 50 571 261 508 122 584 3...

output:

918908630

result:

ok 1 number(s): "918908630"

Test #89:

score: 0
Accepted
time: 2ms
memory: 10076kb

input:

300
52 509 25 240 463 160 587 170 313 319 108 422 273 69 50 16 190 11 205 100 311 579 202 228 30 109 280 3 74 7 124 405 48 127 569 402 472 98 597 370 505 72 332 469 42 235 381 241 538 270 464 390 548 1 263 298 173 394 562 2 320 253 496 164 219 139 518 260 362 546 242 182 296 29 323 187 363 416 554 1...

output:

707412529

result:

ok 1 number(s): "707412529"

Test #90:

score: 0
Accepted
time: 2ms
memory: 10088kb

input:

300
56 292 426 176 133 437 51 419 143 59 3 554 420 215 356 534 451 243 165 52 270 305 515 228 542 485 86 473 353 533 429 475 70 237 202 5 97 375 303 532 259 556 153 570 312 352 6 203 476 137 93 62 411 245 463 269 300 19 405 380 491 196 563 348 538 4 145 279 370 138 33 271 136 530 334 438 488 226 591...

output:

879408664

result:

ok 1 number(s): "879408664"

Test #91:

score: 0
Accepted
time: 0ms
memory: 10052kb

input:

300
33 513 74 309 340 407 486 308 275 210 100 127 60 95 540 491 115 173 385 292 237 226 167 245 70 494 132 23 489 43 118 273 323 534 20 470 78 411 317 450 220 269 333 154 48 320 271 438 343 133 430 575 266 250 369 162 261 16 444 256 209 357 506 208 285 508 68 32 360 104 471 58 147 482 478 400 451 17...

output:

708291707

result:

ok 1 number(s): "708291707"

Test #92:

score: 0
Accepted
time: 2ms
memory: 10056kb

input:

300
342 306 199 185 437 546 94 389 172 237 589 230 357 212 398 295 111 441 435 510 337 324 282 224 232 211 347 547 457 155 470 174 265 391 302 451 385 524 448 358 408 473 121 569 543 359 321 248 348 440 77 308 269 522 406 67 273 461 11 319 128 5 379 179 382 300 599 310 346 238 555 122 387 309 351 33...

output:

370497285

result:

ok 1 number(s): "370497285"

Test #93:

score: 0
Accepted
time: 2ms
memory: 10080kb

input:

300
302 536 511 509 71 90 556 136 337 360 255 173 46 252 562 413 463 248 277 498 593 407 487 331 74 52 22 207 196 244 465 43 39 160 120 245 390 456 289 353 479 271 301 489 183 491 250 246 226 59 238 371 119 166 410 7 597 394 481 20 178 532 201 525 286 404 364 121 44 356 400 158 127 8 146 266 179 543...

output:

6315369

result:

ok 1 number(s): "6315369"

Test #94:

score: 0
Accepted
time: 2ms
memory: 10456kb

input:

300
315 491 98 510 548 119 176 78 522 145 267 168 126 62 313 319 69 599 117 115 260 356 102 200 132 573 497 241 215 547 383 20 377 236 75 542 364 417 446 488 412 578 46 472 553 352 36 424 554 561 492 593 298 94 44 526 305 309 184 201 521 482 230 224 278 15 463 312 308 6 71 582 244 338 588 29 221 227...

output:

35127377

result:

ok 1 number(s): "35127377"

Test #95:

score: 0
Accepted
time: 2ms
memory: 10016kb

input:

300
376 214 428 386 432 339 444 262 309 208 168 100 427 273 95 255 34 39 519 50 290 248 68 264 344 160 330 5 368 275 276 141 132 516 32 71 374 590 540 195 22 400 220 209 62 440 256 98 200 592 127 416 455 185 252 357 269 138 306 343 177 307 325 326 152 410 12 125 60 210 231 106 407 392 398 548 373 56...

output:

781892224

result:

ok 1 number(s): "781892224"

Test #96:

score: 0
Accepted
time: 2ms
memory: 10128kb

input:

300
391 389 144 299 104 79 155 118 436 464 286 583 488 66 466 62 133 72 306 341 112 476 260 450 535 135 200 126 67 568 484 297 65 425 244 584 572 167 533 166 218 588 325 378 517 131 432 350 506 352 596 560 311 40 557 461 575 360 525 452 473 227 103 296 22 383 361 443 6 187 540 441 594 578 47 280 485...

output:

429733454

result:

ok 1 number(s): "429733454"

Test #97:

score: 0
Accepted
time: 2ms
memory: 10008kb

input:

300
280 471 211 236 92 347 388 469 293 494 130 550 77 233 538 41 485 545 160 268 237 585 394 325 586 436 342 227 231 304 569 447 361 544 348 209 318 401 343 360 210 270 246 82 27 467 588 168 207 575 464 408 319 70 3 451 34 199 251 566 103 400 17 83 521 73 21 61 229 43 324 289 341 249 582 404 89 356 ...

output:

643377604

result:

ok 1 number(s): "643377604"

Test #98:

score: 0
Accepted
time: 2ms
memory: 10152kb

input:

300
52 325 207 225 146 294 484 520 588 362 89 550 574 226 304 53 431 318 300 111 480 390 412 408 403 377 139 118 340 358 538 67 230 105 99 204 170 261 143 249 556 167 440 436 79 495 274 262 201 159 137 305 47 430 352 38 134 545 66 42 579 513 476 13 97 555 46 402 15 368 475 373 391 24 276 288 200 511...

output:

318544610

result:

ok 1 number(s): "318544610"

Test #99:

score: 0
Accepted
time: 0ms
memory: 10012kb

input:

300
405 290 119 87 527 429 424 136 487 560 227 162 172 588 127 281 366 329 386 470 229 469 256 109 475 95 20 314 313 497 245 151 494 400 28 241 65 581 493 134 499 566 413 354 321 269 11 538 217 191 422 548 298 200 525 264 491 131 236 496 552 7 242 13 159 522 54 219 573 112 30 390 460 125 393 130 387...

output:

355636567

result:

ok 1 number(s): "355636567"

Test #100:

score: 0
Accepted
time: 2ms
memory: 10080kb

input:

300
245 121 99 354 336 145 295 404 292 9 76 491 529 465 97 253 220 141 139 98 347 462 105 219 189 174 234 346 61 85 375 502 416 154 286 232 456 477 583 381 156 324 201 409 396 215 193 332 153 3 198 294 212 551 40 280 483 211 34 96 302 537 100 124 366 78 119 569 315 521 67 349 353 364 94 581 338 582 ...

output:

44265214

result:

ok 1 number(s): "44265214"

Subtask #5:

score: 14
Accepted

Test #101:

score: 14
Accepted
time: 78ms
memory: 137708kb

input:

5000
214 8143 377 4551 6212 1807 4966 4535 3579 997 7830 3921 7330 6511 8039 1554 3258 9014 4821 7807 1039 7535 4022 2642 2781 8442 3246 141 9033 2806 9569 8010 565 2546 6114 7896 4315 3054 384 1100 9263 9236 8117 8983 8184 2987 5491 8267 1271 5488 3990 494 2917 6363 3528 8154 3334 4216 8742 2805 53...

output:

670627274

result:

ok 1 number(s): "670627274"

Test #102:

score: 0
Accepted
time: 72ms
memory: 138316kb

input:

5000
1759 753 7023 8368 2152 8831 5909 2162 6082 1933 6251 9256 2450 4557 981 8486 679 728 9649 4444 2992 2109 4997 3622 3115 2214 1457 8940 1917 6417 1936 5452 8442 2409 4862 1835 8685 961 1475 1088 5088 6771 8869 6253 4269 1974 9823 4743 9947 6729 3733 70 9349 3246 3914 1533 4149 5801 4233 9015 79...

output:

974573437

result:

ok 1 number(s): "974573437"

Test #103:

score: 0
Accepted
time: 59ms
memory: 137756kb

input:

5000
8796 8561 6690 5590 4994 6522 673 7424 5679 2527 212 3433 5700 8795 4491 227 6905 461 6924 9514 2431 5642 853 6558 9312 7132 907 7014 8516 7737 5082 664 8760 610 6582 566 2015 5541 7207 2726 8442 6617 2926 5081 9423 6660 3669 7960 9589 8487 3231 3070 5578 4114 3504 7931 185 7783 1192 5287 5770 ...

output:

214342482

result:

ok 1 number(s): "214342482"

Test #104:

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

input:

5000
5733 7082 7706 6537 2001 3588 5841 3382 3966 3868 2706 9111 8318 2332 9905 104 5888 1734 3224 3065 867 6643 237 8206 1241 7151 9240 9860 8622 4651 2005 2594 8464 499 3861 5348 5946 4717 3446 720 3801 5067 6588 3980 4024 9824 5345 8442 4390 8944 8034 3653 3002 5775 2354 9389 6612 6581 5522 6967 ...

output:

804368720

result:

ok 1 number(s): "804368720"

Test #105:

score: 0
Accepted
time: 67ms
memory: 137440kb

input:

5000
9692 640 5005 6456 277 1556 3171 3779 7013 5218 5481 5857 1862 1242 3977 1269 978 7251 6438 5058 9920 6266 9652 7048 6583 1334 1452 1618 910 2560 1439 6426 6805 9876 1865 5525 3439 887 4095 1153 435 170 4953 8713 8087 6135 8858 5321 6639 3364 7390 9982 7400 6750 3218 8558 5212 2769 922 9847 769...

output:

75645597

result:

ok 1 number(s): "75645597"

Test #106:

score: 0
Accepted
time: 60ms
memory: 136832kb

input:

5000
117 6772 3554 4091 6933 8204 4006 1660 1640 9224 9482 3679 5560 2791 8125 9385 1183 8965 2784 897 1854 3463 5845 3948 2032 28 4649 5177 7565 5312 6805 9091 5415 38 6099 7110 3213 3263 9486 2627 9715 8531 4498 4437 3596 8981 8754 9165 8894 1381 2315 5935 3808 3730 7284 6299 2343 7337 637 7774 85...

output:

684578449

result:

ok 1 number(s): "684578449"

Test #107:

score: 0
Accepted
time: 80ms
memory: 137976kb

input:

5000
5557 5090 6108 1515 8523 6856 7269 7993 2048 8819 5199 3284 2194 9348 5269 8109 5329 1413 8396 9565 5801 862 6326 9726 5309 2400 1676 9182 4742 8679 6173 6519 4550 1642 7509 2444 6252 7956 2057 5555 4123 8147 598 6039 3762 884 9794 3385 3641 2465 60 5839 29 5514 6672 7303 6218 7387 9920 6768 79...

output:

209497621

result:

ok 1 number(s): "209497621"

Test #108:

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

input:

5000
6901 9337 1420 6264 8503 6947 2493 4238 5990 281 9301 7146 1459 9353 9889 3566 8511 2099 6410 9779 3949 2530 9134 6882 8468 8797 1994 5109 9538 743 6705 3933 607 9946 7532 8140 7622 2108 6775 6591 6070 2468 6142 7411 6707 9599 9829 4315 5172 3177 8478 9195 8649 6858 1610 9283 3601 6861 9592 804...

output:

957972419

result:

ok 1 number(s): "957972419"

Test #109:

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

input:

5000
174 5387 5059 8317 2672 9775 2230 6089 3588 9873 6004 8137 1145 9060 3874 4817 9010 7093 5338 6743 4899 5664 3256 379 9361 5074 5439 5947 7549 9688 7877 4619 4476 610 7500 8515 997 7386 1601 5122 4865 8412 9939 4944 1173 5542 2626 8255 6272 7054 4841 2824 9403 5678 9985 6532 6384 2951 4475 571 ...

output:

187493436

result:

ok 1 number(s): "187493436"

Test #110:

score: 0
Accepted
time: 68ms
memory: 137924kb

input:

5000
4264 9856 8803 6785 6341 5976 3966 2019 5746 9174 4235 6718 3953 4666 6482 9580 9194 5810 8957 5171 5769 1672 2060 9126 2898 359 77 4681 1582 361 7626 5592 6429 2973 7804 2942 6757 7460 9024 8121 2540 4892 9429 1853 8974 599 3259 9705 4887 719 4065 3684 904 579 1621 5898 4937 7086 5013 4304 912...

output:

919500046

result:

ok 1 number(s): "919500046"

Test #111:

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

input:

5000
880 9603 6171 2065 5978 6771 6882 5530 2792 703 9789 4280 6591 5880 5722 8657 5253 5790 2779 5603 8406 6341 1512 8724 9265 4111 9493 5522 1878 319 4115 9371 6311 5275 3851 205 924 6000 353 843 96 7421 5514 1191 9700 9239 5408 7674 3431 7268 5509 9268 3714 4697 8499 4810 6982 334 2529 3309 8239 ...

output:

232164433

result:

ok 1 number(s): "232164433"

Test #112:

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

input:

5000
4338 1281 7953 1048 2099 116 3166 1729 9464 7932 7714 8585 1610 7206 2374 6241 6611 727 6699 838 9162 259 1924 6634 7910 6982 3836 3791 2715 1197 5366 9124 3751 6206 1827 1405 9440 1998 6341 4961 8307 481 6329 6626 2412 7368 4128 8625 456 1270 8240 5322 447 2709 5505 8131 1513 8994 6388 1025 19...

output:

764315671

result:

ok 1 number(s): "764315671"

Test #113:

score: 0
Accepted
time: 52ms
memory: 137392kb

input:

5000
3426 9956 7643 7756 2946 6244 2048 7145 8420 9109 6828 6080 6231 6815 8426 6835 9817 5976 7587 907 1349 1598 9262 5734 7151 1988 1308 6856 7786 6922 7253 5179 4221 268 7982 9730 8935 4400 7704 4942 4307 6115 8492 8811 4754 4147 5303 1882 376 8616 6001 3632 4117 1392 6632 7379 8687 7875 2075 967...

output:

449021792

result:

ok 1 number(s): "449021792"

Test #114:

score: 0
Accepted
time: 59ms
memory: 136980kb

input:

5000
7174 5354 3546 5393 6408 7382 9662 7229 7420 474 7547 8971 3129 3557 5284 3588 7813 8493 5490 4842 7263 1731 760 8420 9532 26 9484 1761 9539 80 3767 8560 3379 2216 4957 1720 6536 6740 364 8820 2887 3642 8489 5866 1521 4860 6484 8911 9608 232 2106 3014 5 8761 3606 8487 2444 7760 3095 5396 640 97...

output:

776570605

result:

ok 1 number(s): "776570605"

Test #115:

score: 0
Accepted
time: 52ms
memory: 137896kb

input:

5000
609 5645 5015 7745 3536 1283 9933 7027 9134 4273 6879 7488 629 9816 8593 752 9115 803 2143 1633 5722 3855 3027 2488 331 7371 3745 9144 192 5288 9195 417 836 1639 3224 6037 7861 4935 8420 7541 9771 2706 537 686 3175 160 4813 5074 7798 8554 4232 5622 5044 1446 2339 2608 4967 2384 4784 2616 3816 7...

output:

901287144

result:

ok 1 number(s): "901287144"

Test #116:

score: 0
Accepted
time: 63ms
memory: 137992kb

input:

5000
1470 3131 3168 6327 2826 4228 4972 9542 5927 1188 1407 3747 8099 3541 6487 3157 7879 8689 6069 1322 8552 7376 7142 6893 7637 773 6256 2491 7205 6704 7754 8922 5048 9171 3424 236 8648 5816 1100 8320 4314 7619 1239 8373 7433 8309 3301 8555 9246 2267 861 5259 3332 7871 1139 5195 5860 687 9618 3277...

output:

448640742

result:

ok 1 number(s): "448640742"

Test #117:

score: 0
Accepted
time: 69ms
memory: 137996kb

input:

5000
4747 7771 8684 5232 9249 3059 3478 8721 7319 1050 8176 4461 8281 9937 8456 5890 7373 2729 7516 5442 789 9174 8211 8354 4431 2972 9779 6558 5812 8776 3789 6883 466 4875 1062 6731 7347 3501 5127 2862 4614 5621 4403 5050 8202 8156 8679 7321 4866 5699 3122 5538 9999 3015 537 9767 7953 9341 8692 742...

output:

88073928

result:

ok 1 number(s): "88073928"

Test #118:

score: 0
Accepted
time: 61ms
memory: 137848kb

input:

5000
955 2934 1308 2202 6058 4683 3685 8592 183 4332 1999 7375 493 2871 5032 9742 8379 3996 5539 9620 5642 1926 1479 8564 1064 9486 4293 4079 3049 6340 1086 7193 7008 4063 3824 3161 1057 9386 7841 9252 1054 7727 8646 510 3937 2771 9332 6195 2386 2894 4887 7045 4457 7368 6794 263 261 8812 9281 4825 9...

output:

100276847

result:

ok 1 number(s): "100276847"

Test #119:

score: 0
Accepted
time: 71ms
memory: 137712kb

input:

5000
8555 627 7527 2519 1943 2648 1083 1349 405 840 7059 6329 7737 4276 1014 1911 2135 4758 9289 8839 9872 6199 2123 6719 3061 4537 9888 2283 6475 5877 6206 7395 7974 1816 7836 387 6960 9560 1431 9794 8688 3660 939 8890 1753 3220 456 6473 5290 9805 1655 2998 744 2371 6127 608 3970 125 1481 1546 1860...

output:

317197989

result:

ok 1 number(s): "317197989"

Test #120:

score: 0
Accepted
time: 52ms
memory: 137868kb

input:

5000
1747 6971 4530 6843 3102 6212 9328 5186 8836 985 2057 243 4469 1657 2170 7754 917 7178 6615 1119 2340 5381 1650 3863 1066 6164 3734 7614 1832 5325 2004 8901 3190 6108 829 4555 812 799 5836 1675 2647 1690 2481 6619 1307 4280 2126 1343 9574 5617 6141 6800 9028 5256 2985 5656 255 5175 525 1017 440...

output:

289446719

result:

ok 1 number(s): "289446719"

Test #121:

score: 0
Accepted
time: 60ms
memory: 137936kb

input:

5000
3638 6104 6491 993 671 4580 109 1581 501 8968 7343 9643 7955 8860 9800 5080 3366 8557 742 2518 1083 8056 1617 7797 7906 7005 5217 4613 4905 1296 5591 5598 5192 4768 5532 9948 8972 1897 4992 2525 2684 1201 5831 2032 9123 2756 4747 6494 8364 719 1331 5332 835 502 4915 4425 6921 3474 1032 7024 825...

output:

802154235

result:

ok 1 number(s): "802154235"

Test #122:

score: 0
Accepted
time: 63ms
memory: 137588kb

input:

5000
9468 5908 3533 6302 1914 2624 382 9104 8026 6257 4577 8771 9926 8983 872 2781 8536 2246 122 4986 5333 1237 575 1591 4304 9003 5580 4338 8458 6923 1423 2091 6041 7095 9656 356 5479 1868 6775 5949 6238 2302 7539 7261 7144 2468 4186 3740 9594 2715 9031 5222 109 6047 4148 877 7157 5976 8147 2380 12...

output:

407563080

result:

ok 1 number(s): "407563080"

Test #123:

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

input:

5000
7973 725 51 2064 2118 664 7687 6966 9834 1444 7686 2015 4632 8465 5341 6770 5845 694 1116 1582 3372 744 9787 8675 9995 1969 5111 7755 1097 8865 4686 7848 2009 9397 3657 9130 8992 7535 7010 7401 6190 3231 2007 1524 9861 690 5606 8025 4773 6299 3816 8991 822 9816 7791 1124 2170 147 3818 4582 631 ...

output:

79327601

result:

ok 1 number(s): "79327601"

Test #124:

score: 0
Accepted
time: 63ms
memory: 137456kb

input:

5000
4834 1837 6179 2009 9542 9694 2218 689 575 4500 490 8267 1114 8131 2014 7460 9580 702 6200 4266 2661 1588 8865 4555 4367 4802 603 9163 4119 6899 6796 7833 8426 731 1753 8204 1024 9121 2052 7628 9675 8577 9685 5529 4800 1611 2122 7926 3684 1064 1465 8180 4204 3394 5791 5238 6086 5808 5064 6578 1...

output:

715092633

result:

ok 1 number(s): "715092633"

Test #125:

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

input:

5000
2612 132 1744 3151 4592 2773 3722 8778 4330 2254 3920 1648 3135 674 7405 5497 1108 1373 9976 2345 7505 9797 8470 3354 4326 6653 8758 9861 6223 3276 7900 1922 3723 3980 5066 3450 2619 3359 1994 8848 2190 1094 2410 1726 8259 5484 8552 1787 4195 977 9460 2031 9821 2586 8506 4609 370 5795 5477 9820...

output:

635950303

result:

ok 1 number(s): "635950303"

Test #126:

score: 0
Accepted
time: 67ms
memory: 138184kb

input:

5000
8081 3988 9018 9632 9344 3011 6202 4194 7788 6660 8944 1108 7576 8126 9234 8312 8839 2401 8191 1117 7235 2499 4927 9782 3380 7367 4396 2876 2656 1226 1178 5810 962 1824 9395 5516 201 460 882 5781 7774 5217 5638 9690 9843 9905 3883 9507 1889 3476 1056 1899 3696 2719 3955 1064 3393 7393 1429 6838...

output:

856169128

result:

ok 1 number(s): "856169128"

Test #127:

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

input:

5000
9186 8879 1396 1344 2713 3685 6816 558 979 1576 1080 5431 7602 7814 5248 1414 5665 8812 1941 1614 5186 8389 1961 2406 1556 7218 2016 756 3660 49 68 414 177 1309 3502 431 6917 7752 9544 8191 3180 9058 714 8436 7686 7339 8603 3723 4155 5499 5865 4113 9250 8366 6594 146 1265 9106 227 6904 5388 323...

output:

849762559

result:

ok 1 number(s): "849762559"

Test #128:

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

input:

5000
3677 5082 7767 8194 958 2265 6107 5730 2659 493 1397 4555 5757 6549 6224 701 1695 1843 9419 9454 9776 6951 3385 3373 7649 4731 369 7613 589 225 1680 8432 7634 3381 5296 6375 269 7319 277 4453 8010 446 1205 1143 5838 6858 3881 9736 5960 5105 7041 4242 3770 1156 4714 7802 7069 7660 9781 8267 6714...

output:

270780098

result:

ok 1 number(s): "270780098"

Test #129:

score: 0
Accepted
time: 71ms
memory: 136372kb

input:

5000
3596 5809 2733 8104 7028 7210 7849 1887 9414 1649 3813 1046 3988 6371 9703 3981 3844 7321 2872 7604 4635 3922 5647 9460 7937 9968 8502 9950 139 2977 1426 8688 4611 8698 2180 3390 3683 7449 1591 565 8682 2665 515 4531 6325 9118 6118 7318 9881 2841 8174 6331 6433 7532 7977 2696 8443 4212 580 8347...

output:

276344313

result:

ok 1 number(s): "276344313"

Test #130:

score: 0
Accepted
time: 59ms
memory: 138252kb

input:

5000
7332 3835 4706 9465 2141 4257 4073 4208 5509 5975 8922 9398 534 1058 7515 2696 3 6882 7577 547 351 7942 7343 814 8382 1199 8180 7160 4921 3033 89 8147 7965 8110 3583 5703 3142 6705 3906 7133 430 307 3934 1328 2245 9682 6426 5026 8354 3149 1228 7276 4900 7946 8788 1718 9508 4983 5038 5528 473 28...

output:

661664710

result:

ok 1 number(s): "661664710"

Subtask #6:

score: 15
Accepted

Test #131:

score: 15
Accepted
time: 63ms
memory: 137284kb

input:

5000
3846 2428 4235 4639 1041 2385 198 6154 6899 8917 6284 9752 8913 2027 9242 6979 498 2562 5915 3968 9943 2767 3776 3415 3532 1826 8061 9507 6540 1850 2235 7245 5751 5780 3048 23 361 2777 262 8551 4969 1367 8671 7424 504 5822 3056 6816 9246 6810 1643 8378 9672 7472 4092 8226 5973 157 9275 4757 619...

output:

293162006

result:

ok 1 number(s): "293162006"

Test #132:

score: 0
Accepted
time: 60ms
memory: 136956kb

input:

5000
240 4709 3812 6283 3693 1669 9860 3134 5254 7223 3622 5405 5334 8727 2320 4081 5921 7770 56 5206 6720 791 5109 5488 6479 972 5972 3418 4238 1080 671 3169 1655 6331 3262 7239 9046 4566 3578 2042 7627 5631 2386 5707 1485 5286 4220 1799 4386 5613 5667 8696 1382 5027 2932 9940 9177 5115 9712 9218 7...

output:

982495908

result:

ok 1 number(s): "982495908"

Test #133:

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

input:

5000
1699 1241 5807 206 1274 2020 5048 4096 3631 1656 295 8588 9787 9927 7125 8332 8251 4720 8444 4085 2236 5592 5941 7136 3421 7052 2897 744 2284 5393 7425 4196 901 2670 4880 6984 7870 951 9392 1536 8962 5403 617 6922 3367 544 6840 4662 7877 3856 3870 5560 4598 7025 8375 9608 2094 9232 6021 9414 85...

output:

810997105

result:

ok 1 number(s): "810997105"

Test #134:

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

input:

5000
3423 7958 7269 7816 6453 5678 9437 4465 8047 9907 4128 6776 5511 1497 3007 817 6219 3914 5805 9209 4639 6293 2114 396 7104 5250 3072 5605 8079 3077 5784 7090 324 6611 4427 2817 2948 7716 6697 4959 6129 6417 4569 2830 6217 1602 1660 138 3519 9646 9521 4309 1532 4768 217 4432 6295 8560 76 3886 76...

output:

289324667

result:

ok 1 number(s): "289324667"

Test #135:

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

input:

5000
2705 3823 7650 789 5507 9707 7219 8902 2396 3573 8421 9720 5487 3984 388 7838 3617 3546 4383 2479 3522 4561 6706 3887 9833 5323 4173 3003 4924 2368 4159 8558 8289 8674 2643 5861 3012 4569 7072 1891 8481 8987 7449 9057 2236 7101 8659 6215 9515 1272 3958 8735 5735 2301 4388 6947 4048 6858 7693 96...

output:

539769486

result:

ok 1 number(s): "539769486"

Test #136:

score: 0
Accepted
time: 80ms
memory: 137792kb

input:

5000
6077 3742 9908 10000 8838 3859 8752 4146 7761 3934 9383 2760 5733 4697 2482 9862 6148 738 977 7783 6072 4568 3777 9826 9691 8776 3267 7804 3579 3261 3547 5673 5303 4569 2512 1110 1112 5566 7447 7312 1494 3682 6250 4910 8392 5147 1203 1600 8372 500 5774 9449 2033 3666 3560 327 9181 5339 8035 255...

output:

588728530

result:

ok 1 number(s): "588728530"

Test #137:

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

input:

5000
6922 347 630 6220 3525 6843 9351 9180 9243 6405 5614 7512 5364 6746 9925 9619 2446 134 3772 6870 2292 4845 8610 9596 8429 8799 1482 651 8028 9611 2822 7264 8234 8165 3993 631 1709 7975 1235 7506 8272 3730 175 325 1567 509 6963 4058 3322 4618 924 3718 7098 9575 9885 4120 1310 1975 5397 634 2312 ...

output:

634459802

result:

ok 1 number(s): "634459802"

Test #138:

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

input:

5000
4749 5073 5623 9534 7406 2269 2303 8969 8193 1460 7389 6815 5448 3120 1534 4989 6577 118 2189 9937 8669 7590 1258 6313 2956 2333 1447 7591 6394 1670 4162 941 4679 3407 5041 2051 3603 156 143 4429 900 8462 8355 8221 3046 5296 4407 7562 7444 5857 7297 2245 1036 312 2792 3511 6675 3720 7019 158 60...

output:

981183435

result:

ok 1 number(s): "981183435"

Test #139:

score: 0
Accepted
time: 59ms
memory: 138004kb

input:

5000
5177 512 2717 47 7993 5591 4003 1 770 510 8258 8815 5666 6285 3544 9573 9774 425 267 1479 1419 177 3540 7371 3905 6210 9158 2299 3998 2654 3165 3901 1780 5947 1582 8502 5179 6687 1875 678 1763 6454 4481 9172 5613 988 6154 3020 890 4840 6788 4279 622 3914 3316 2679 1178 1986 3637 2513 5157 6122 ...

output:

583471891

result:

ok 1 number(s): "583471891"

Test #140:

score: 0
Accepted
time: 70ms
memory: 137388kb

input:

5000
6978 6535 2430 3300 3059 2934 5786 2005 1317 217 6395 7952 3667 260 9414 4168 311 2516 8380 4316 2394 2666 6892 1944 2239 6386 1636 3650 2495 3660 3664 6047 5155 2377 8878 8288 6383 6706 7732 349 2278 4095 9686 5812 100 5097 2874 6262 126 8066 6011 9562 8814 8164 3810 5006 2090 9336 4937 7874 1...

output:

448725950

result:

ok 1 number(s): "448725950"

Test #141:

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

input:

5000
3522 4657 994 5336 4378 295 4422 827 1650 4479 502 3369 6320 203 7741 8041 949 9701 8368 5930 1340 3990 5315 7450 4380 3957 9598 9403 5018 2154 9735 2622 8241 2305 9948 1470 6490 8891 5041 562 1936 714 6809 8976 6517 7861 1059 6556 8184 1343 8524 6046 8562 8350 3342 3274 7753 3046 2101 5148 707...

output:

878469109

result:

ok 1 number(s): "878469109"

Test #142:

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

input:

5000
5221 2248 4912 8212 7213 401 6818 6955 7372 551 2599 7697 7169 2707 540 3096 7146 54 8889 8290 1399 2166 8452 3502 5866 5974 1102 7360 2892 176 2817 6114 3730 6489 7008 6312 7838 9020 581 5844 394 1324 1683 9650 6270 7735 3918 9301 2606 2451 1204 4875 3430 6207 9751 9964 4584 5962 2600 6735 303...

output:

955174962

result:

ok 1 number(s): "955174962"

Test #143:

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

input:

5000
436 1051 279 12 3940 7923 1069 2941 9169 2661 2149 8721 8378 7578 7951 2770 6262 5999 1657 2881 9661 809 4185 301 6896 7495 9564 7420 6807 2996 645 1715 3570 4601 2348 9328 5748 7853 166 1825 8577 1284 6000 1080 9141 7962 335 3357 6727 472 3229 6993 5964 3286 2355 3455 6003 6999 7327 2152 6205 ...

output:

984823517

result:

ok 1 number(s): "984823517"

Test #144:

score: 0
Accepted
time: 61ms
memory: 138056kb

input:

5000
2000 612 5498 6477 7189 6953 3277 4256 8763 9494 4366 1333 2647 8383 618 2335 6673 9192 7015 1894 7216 2668 1420 12 8198 8528 7021 1565 704 4777 5607 9165 3607 4070 106 4244 1601 6452 4257 1643 6441 7771 5768 5973 3201 469 9265 7359 5217 7944 1060 8559 3248 3137 6971 4482 9153 6596 520 1464 977...

output:

15065864

result:

ok 1 number(s): "15065864"

Test #145:

score: 0
Accepted
time: 80ms
memory: 137784kb

input:

5000
1463 6468 5812 4238 900 6433 5564 5916 7626 4371 651 3843 1975 9916 2891 8050 7869 4306 1152 1776 8052 4295 2912 625 8309 1800 5457 4076 8521 7022 4601 1593 5865 6052 6784 4551 7931 3046 7801 8217 9914 2588 5375 817 8537 7347 8931 4088 9928 9877 110 4431 7546 6664 7643 9963 812 7621 8685 9177 6...

output:

948060514

result:

ok 1 number(s): "948060514"

Test #146:

score: 0
Accepted
time: 72ms
memory: 137744kb

input:

5000
674 55 5723 783 3653 1165 2000 6882 3505 2846 2862 7185 8733 5370 1290 8523 8830 9274 4865 9817 7817 6677 8717 8393 5020 1269 7496 1543 230 3097 8238 4867 8504 3385 6097 6590 7539 5923 4189 3241 1887 5512 689 4308 2558 3976 4143 2920 2182 769 7215 1937 4807 51 6728 8377 9126 7628 6135 9079 6035...

output:

450594619

result:

ok 1 number(s): "450594619"

Test #147:

score: 0
Accepted
time: 67ms
memory: 138272kb

input:

5000
7726 7503 845 332 8711 6404 2520 1681 499 416 8671 6470 4800 2281 4439 87 6222 3573 5407 8436 3658 3657 4469 6571 268 7597 3485 4407 3724 7259 2764 6784 4948 6485 1389 4645 4633 5790 1403 5086 3336 6930 4642 1314 5651 1608 4526 9754 9335 7748 2823 5534 349 8484 6680 4837 2282 4389 4432 5090 826...

output:

89143754

result:

ok 1 number(s): "89143754"

Test #148:

score: 0
Accepted
time: 68ms
memory: 137388kb

input:

5000
6570 3360 8804 3873 5779 6303 541 7362 1680 5403 5919 3951 9020 5086 4915 8009 8825 4041 6513 9502 4589 9158 69 2243 7580 6874 614 1982 871 8159 2503 609 9219 6222 1247 536 338 9307 3611 12 8285 8834 300 2133 7888 3946 9032 478 9127 9575 1123 6003 5034 1644 5189 6845 1735 8364 6307 4303 1002 13...

output:

966325097

result:

ok 1 number(s): "966325097"

Test #149:

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

input:

5000
4678 2523 9203 6911 6285 9537 2958 5940 140 8310 4970 504 9531 8107 9210 2203 7448 1260 940 6118 6876 8656 8315 5148 3366 4318 9322 4077 8113 1708 721 8857 526 5012 9326 5917 3278 9467 4145 4018 8464 1997 4245 7147 282 8788 2476 1207 1171 4742 6490 8343 6668 1486 2955 8247 9078 8532 6802 4822 2...

output:

320130853

result:

ok 1 number(s): "320130853"

Test #150:

score: 0
Accepted
time: 72ms
memory: 137952kb

input:

5000
5693 9926 4379 4075 8827 7375 6591 6517 9545 2827 1210 2479 8886 5796 6925 3307 9563 4242 1437 8059 9557 7415 5623 5332 2598 3054 9744 7032 762 5484 3728 6981 2356 6303 2559 2069 9512 4472 2088 2130 9644 563 463 2798 9635 1952 4506 3190 3106 8374 5945 1979 669 2778 6754 3063 2729 4218 7852 4881...

output:

102623056

result:

ok 1 number(s): "102623056"

Test #151:

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

input:

5000
1374 1800 3181 2586 5344 434 9784 4166 8291 208 7901 651 8963 2818 352 4437 5018 9997 2596 5924 9163 5912 1404 9384 6554 6430 8357 691 9201 9622 2470 9177 7379 3870 1271 7520 364 1888 835 9494 6946 7461 3074 8395 685 7130 1953 143 3711 647 2128 3945 8616 2480 6437 8767 8025 1042 3776 8447 5949 ...

output:

895146486

result:

ok 1 number(s): "895146486"

Test #152:

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

input:

5000
6943 2525 8619 5977 1341 9841 600 8031 7245 5457 2501 4794 4086 457 1675 3053 9793 5123 3005 5822 2591 1000 2207 4841 491 4855 2219 8528 4515 4728 9038 320 5746 6655 5949 4387 6010 7568 4182 1175 8883 8737 6604 6983 929 8715 5277 5882 298 8952 1925 3427 3290 5662 9502 6385 9066 4094 2679 2807 5...

output:

743687661

result:

ok 1 number(s): "743687661"

Test #153:

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

input:

5000
5412 8259 2256 6833 4357 8463 3594 6876 347 8828 5258 7161 1979 5975 1114 9793 9679 3970 5526 6128 2972 3018 7959 7874 6567 3601 9929 7322 2456 2951 9803 3356 6696 3888 9495 5800 3329 4352 2789 5613 5970 6446 1158 9881 3260 5357 3928 1789 4649 8005 1275 4212 2712 2542 3980 1748 6000 2301 2652 2...

output:

345242788

result:

ok 1 number(s): "345242788"

Test #154:

score: 0
Accepted
time: 69ms
memory: 137152kb

input:

5000
2712 9669 5725 4610 9905 7585 3257 280 834 7256 8279 1854 7077 2814 7065 898 6210 1180 8424 4870 5811 660 6116 4541 5094 8037 2629 9350 8253 6544 5262 3170 5699 9466 7149 4986 7985 9676 3537 3875 1232 4706 5549 3589 4533 1684 7641 8600 3315 6806 8572 7825 9253 6893 3142 4954 1910 4894 239 9620 ...

output:

924128079

result:

ok 1 number(s): "924128079"

Test #155:

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

input:

5000
6480 8087 8226 8465 2335 3984 897 5064 4046 9153 2816 10 9653 4872 2338 8800 545 6708 711 2229 6855 5779 2587 2582 4088 2368 1801 1447 468 7698 1287 5459 9240 9763 6268 1891 2976 3758 4984 4738 1681 4618 6456 7045 6612 5348 2469 4465 9710 565 6449 2691 9618 8566 6238 6473 3807 2942 3893 6990 96...

output:

329370807

result:

ok 1 number(s): "329370807"

Test #156:

score: 0
Accepted
time: 79ms
memory: 137864kb

input:

5000
6985 5119 6467 6125 1567 6617 7979 6812 7190 6991 5595 3433 4632 3773 2179 9442 8929 3569 2634 6200 954 318 2314 6685 275 9895 387 1843 7047 3721 220 455 983 3434 1711 3178 3897 7236 6777 8524 6097 9573 3029 842 447 2669 5063 8219 984 3899 248 905 2919 7514 8553 923 1909 4143 1149 6794 8146 492...

output:

365890389

result:

ok 1 number(s): "365890389"

Test #157:

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

input:

5000
8352 8078 7174 7376 1960 3231 7451 3176 3314 9710 2299 7461 1951 8640 2245 2321 904 9405 6136 8794 895 2828 7335 6592 13 6363 8919 3932 4479 1802 3666 8800 9967 9081 2886 4887 6376 7609 4852 6212 5135 1053 35 6653 2664 4316 3391 2444 7212 2671 8054 5483 4820 5865 1117 1958 8493 7198 4609 8576 6...

output:

862874037

result:

ok 1 number(s): "862874037"

Test #158:

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

input:

5000
434 8072 7671 3385 5519 6111 4147 3519 8300 4983 9204 8959 732 676 5029 618 7839 7243 7852 7734 177 5182 8989 7364 7733 6057 2759 3480 1761 7805 793 1078 8265 8071 4125 3606 5172 1415 3090 1312 3425 241 3968 2920 4496 3301 4862 4355 1995 508 8321 6085 9640 8142 7663 8270 4717 4149 7028 6241 331...

output:

58087383

result:

ok 1 number(s): "58087383"

Test #159:

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

input:

5000
7603 9124 4188 8310 8718 3713 6004 568 5952 8121 2848 6998 2752 6387 8932 4751 4851 372 8223 612 7195 1274 1675 3398 6124 4747 7998 8117 4895 5168 1481 2821 980 4341 7811 1043 9263 5099 1881 9578 5566 2058 4853 2833 9141 6294 8019 9551 442 437 6761 2820 6221 5868 7552 2877 4013 5496 7240 1253 7...

output:

139767526

result:

ok 1 number(s): "139767526"

Test #160:

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

input:

5000
3203 9872 8925 3448 9048 9982 8842 159 7168 7699 1428 8478 6026 7044 6861 9810 9472 5918 2403 3655 7667 4297 6972 6322 8125 1031 3019 5746 5038 4723 1212 6596 4813 2343 5476 9231 3975 7206 4127 7607 690 1271 5871 8627 1576 7073 9985 7224 6723 8668 931 7474 5683 2705 8102 8393 5428 4371 4375 360...

output:

30037674

result:

ok 1 number(s): "30037674"

Subtask #7:

score: 17
Accepted

Dependency #4:

100%
Accepted

Test #161:

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

input:

300
191 165 526 38 537 109 12 210 506 123 516 340 49 81 181 208 186 87 39 318 381 540 9 565 312 536 183 204 313 164 291 258 472 205 132 511 497 242 379 263 393 236 539 590 41 473 504 23 234 566 422 440 427 546 148 374 16 255 317 356 221 195 352 228 249 273 30 416 198 428 300 551 534 75 133 158 188 3...

output:

273132513
887672688
409288709
142455919
773484598
317630612
804060490
856508392
557665061
75327539
874391513
12751682
619560322
685590351
41963476
518972526
578870954
365846076
747713799
73288435
461104624
305773533
584124575
385013863
616587895
696967390
268476696
789289888
973454496
773028995
3606...

result:

ok 301 numbers

Test #162:

score: 0
Accepted
time: 2ms
memory: 10136kb

input:

300
345 333 529 502 81 16 557 20 149 396 43 359 568 223 90 24 524 405 595 202 350 214 96 14 556 368 220 585 257 295 249 85 110 594 584 103 355 222 144 308 162 75 122 23 233 456 387 101 127 287 500 335 523 540 340 180 58 510 166 32 217 240 535 496 415 147 285 48 232 183 379 317 458 169 382 412 152 25...

output:

322266516
325315118
353389289
284167591
982946575
220325534
0
323634953
366065386
857374154
585611911
33917891
585706241
764631702
464675016
974996048
575035369
32750369
211481913
984692997
789975730
29359370
816545224
301957097
709575667
657891101
614464899
118224472
642467638
252171351
420240944
8...

result:

ok 301 numbers

Test #163:

score: 0
Accepted
time: 0ms
memory: 10084kb

input:

300
62 7 352 333 353 370 266 555 481 429 196 262 399 99 483 482 537 377 181 378 190 47 446 85 189 495 433 449 428 200 471 566 359 365 223 168 347 300 448 594 170 27 275 470 98 401 312 304 384 554 411 43 227 480 553 301 41 278 134 592 222 315 274 523 443 544 244 362 250 108 203 329 176 323 128 296 38...

output:

702578073
163778045
52401258
126688349
568937351
987965321
323769903
406404617
880027167
78356538
736332407
271492223
230740709
193264238
744303334
328919728
795992158
839830357
690302379
880285925
143703827
36128888
724810850
946306678
266731447
109675167
882353489
622795517
459271845
706232516
124...

result:

ok 301 numbers

Test #164:

score: 0
Accepted
time: 0ms
memory: 10080kb

input:

300
597 102 360 280 333 83 507 563 544 391 471 543 570 303 552 517 36 421 465 424 462 491 273 30 165 1 127 505 541 237 561 436 131 551 370 411 518 144 355 245 115 510 542 447 580 413 565 417 459 599 251 201 96 399 240 22 130 394 253 464 271 281 270 246 141 255 326 432 284 23 494 157 136 523 238 142 ...

output:

772308400
608630973
573917825
985275200
455686080
415809880
224576884
95587936
313515453
117121661
441234274
356855988
372995213
195816338
247390942
856332618
761138382
880820652
71983779
435240917
31204981
402574428
838568236
472832138
855501449
750861807
398945383
815586899
416062621
712556559
541...

result:

ok 301 numbers

Test #165:

score: 0
Accepted
time: 0ms
memory: 10096kb

input:

300
532 80 375 55 62 300 558 352 256 271 164 185 43 566 514 156 527 250 304 536 509 188 545 336 286 235 330 234 490 449 579 200 323 270 86 576 493 487 437 88 390 419 112 518 144 543 197 587 436 194 261 502 365 182 403 381 393 267 106 539 145 90 100 406 473 172 462 368 465 2 51 63 48 218 467 210 455 ...

output:

704778339
222204069
512737185
361186579
514227588
92674712
37190650
796334974
404395491
150530199
445326531
961946184
878562465
174247982
383463641
262373488
463156892
2557019
558515256
445108198
703115734
228529620
828986362
251490620
12105848
979865767
861764725
327321568
660773470
826960256
47454...

result:

ok 301 numbers

Test #166:

score: 0
Accepted
time: 0ms
memory: 10148kb

input:

300
599 423 503 453 127 593 155 492 333 135 173 222 442 228 438 312 571 383 82 356 246 454 30 260 335 595 258 486 194 563 267 310 452 263 574 62 29 306 389 497 355 199 313 16 153 48 277 84 213 416 18 301 144 40 484 259 241 412 160 97 461 5 545 588 166 422 436 78 44 146 243 266 90 19 398 396 86 36 30...

output:

242719505
244021026
429825703
718159725
389947087
534402960
350916865
540720807
393390453
665035742
215855745
464303339
871345738
877140794
595844362
906495577
0
363464057
697127041
23683290
109876589
242370568
862707026
22545380
376316718
989806867
752702781
952724684
636323903
452166654
599811959
...

result:

ok 301 numbers

Test #167:

score: 0
Accepted
time: 2ms
memory: 10076kb

input:

300
448 419 274 267 174 313 350 62 122 377 284 450 232 583 105 451 223 113 26 212 204 87 133 39 300 466 511 118 71 168 109 506 576 200 533 18 593 207 599 282 172 397 404 526 440 366 165 161 99 179 360 88 257 314 92 272 59 121 556 280 295 565 591 211 69 251 237 418 588 37 160 114 365 424 208 597 489 ...

output:

11872440
656454887
376435011
803421104
918392619
667071742
747557783
566437210
979411360
207642068
625307402
862376500
494479136
605797202
218738287
231166993
712298113
200970647
791984654
208449072
892413117
225279652
534873759
926044793
52887527
674893271
125131754
486780201
99592326
997648140
990...

result:

ok 301 numbers

Test #168:

score: 0
Accepted
time: 0ms
memory: 10088kb

input:

300
433 51 559 156 192 47 188 214 310 125 510 367 74 141 347 181 3 98 106 340 183 176 298 61 372 568 175 142 168 251 588 296 264 421 272 502 245 312 522 321 515 101 21 426 384 571 91 30 194 23 174 383 50 575 256 549 150 269 596 284 185 10 179 585 578 444 81 593 531 423 478 332 594 288 258 100 482 43...

output:

10904335
581198053
590001461
901572073
892195950
854853409
638248066
249021864
886371978
270053834
691353634
72904788
522822014
483443694
569118913
494740233
404514121
420493518
334011073
444053651
456247555
593936543
915152739
904191323
894810282
971256301
747473108
598745528
432099673
522849489
31...

result:

ok 301 numbers

Test #169:

score: 0
Accepted
time: 0ms
memory: 10072kb

input:

300
248 363 150 105 45 362 464 98 226 469 261 303 344 596 592 352 108 243 91 231 351 22 216 581 297 437 287 549 299 576 276 446 573 449 64 588 584 14 80 441 311 485 81 132 100 254 575 73 286 528 97 126 187 50 117 555 354 177 310 138 492 21 478 183 42 560 229 550 47 93 112 292 147 332 527 356 539 594...

output:

210167259
588996826
414607013
509389267
974303127
326044002
817681174
804998734
20690393
184399655
747044527
227340795
251043950
438291486
263509953
52596316
322588549
796745844
255811568
308272052
195550964
608644534
197436054
61566497
89103318
322990167
71120257
980511342
155001273
316288820
66318...

result:

ok 301 numbers

Test #170:

score: 0
Accepted
time: 2ms
memory: 10012kb

input:

300
421 220 17 390 409 6 443 338 406 228 535 425 593 247 422 376 47 313 149 380 587 561 42 456 46 457 566 57 306 77 349 449 278 98 594 140 33 324 392 598 320 507 171 183 596 141 479 173 428 64 201 365 344 495 597 60 59 317 85 285 580 224 467 237 202 451 132 255 364 510 128 265 399 155 187 169 544 46...

output:

184137893
604353441
48362205
718287647
963981564
470011660
398591124
885610817
844153248
463338233
718794110
609884535
362252886
518864058
493836381
301465728
324400287
78565670
58267569
914785060
278834817
90120067
943760783
344332785
463143143
872149718
995922780
676340723
24223471
148083992
62328...

result:

ok 301 numbers

Test #171:

score: 0
Accepted
time: 0ms
memory: 10064kb

input:

300
145 134 527 462 541 167 79 104 542 228 293 182 454 465 161 54 436 223 211 544 336 78 123 482 18 586 75 473 113 420 395 503 198 304 63 265 515 2 301 364 315 43 126 598 91 273 402 277 136 249 204 243 488 390 505 553 122 356 241 268 334 452 400 152 203 225 82 39 276 579 563 342 539 140 240 202 576 ...

output:

166624932
152217900
223493797
888656959
740466774
470155239
124251401
980489471
828529859
59244496
919707593
237455285
361194031
836426077
764537848
620997951
541838358
874003644
852818298
156109745
888081364
18127759
962580048
107616660
712597353
181190978
349833721
456236729
732312930
994902022
72...

result:

ok 301 numbers

Test #172:

score: 0
Accepted
time: 0ms
memory: 10088kb

input:

300
536 88 529 187 269 353 428 489 566 356 484 213 574 549 453 95 245 288 459 262 89 580 101 444 513 320 440 116 23 581 502 441 196 449 436 25 261 162 180 41 585 193 309 195 293 46 598 490 259 463 79 537 512 83 582 346 181 260 368 517 142 455 290 130 345 347 281 411 373 149 365 474 589 593 516 398 1...

output:

234530310
146199703
576359358
579733062
420714391
734891930
466510242
708212070
816408566
391252295
712772184
788350269
119075036
22648882
12243699
934352784
15116385
704313358
265397535
123277185
958543600
356594995
378483557
408926864
467607919
388621035
974395188
266499772
461270473
202324374
288...

result:

ok 301 numbers

Test #173:

score: 0
Accepted
time: 0ms
memory: 12104kb

input:

300
497 505 482 170 69 101 288 399 560 332 439 18 3 334 103 375 562 14 515 244 17 57 384 516 77 584 62 378 175 117 130 546 148 174 400 552 360 24 571 4 156 50 397 89 15 145 27 143 450 598 268 184 321 11 97 205 81 427 541 422 59 322 589 1 354 206 511 581 500 492 330 498 119 576 213 475 64 586 566 199...

output:

776572625
861866188
548065473
940686724
188877761
866414585
262930574
561114271
845125349
222336877
323527246
505498968
939541828
800485060
916157613
120918095
878586716
394641526
212578198
673831196
785240157
788105833
478315406
779768408
249665197
660446233
668313309
825693914
72964908
199818613
2...

result:

ok 301 numbers

Test #174:

score: 0
Accepted
time: 2ms
memory: 10092kb

input:

300
341 94 273 50 583 471 193 185 100 333 320 236 332 292 342 414 421 297 26 531 543 35 221 372 322 254 309 447 14 475 39 154 91 75 449 469 420 443 510 526 8 398 285 182 6 358 140 158 399 286 78 557 298 598 101 495 391 364 432 385 250 56 594 537 18 139 170 65 403 439 562 197 4 558 433 440 218 82 280...

output:

741574237
268697668
195637869
5193683
568579915
945632538
672764580
747501640
689410905
977932706
338264011
314125416
725614699
147890771
819999880
329442724
719091027
483433682
935191538
914756070
323956356
247970766
929551053
2296842
926195699
57959994
378010925
582416103
926894525
657198382
62751...

result:

ok 301 numbers

Test #175:

score: 0
Accepted
time: 0ms
memory: 10080kb

input:

300
71 89 249 280 520 411 476 504 441 532 481 13 252 491 332 123 131 277 247 483 380 563 31 568 58 514 346 362 39 422 88 313 292 512 493 276 464 207 16 60 413 591 535 106 430 423 473 548 74 2 80 48 34 341 543 92 598 496 494 231 566 188 337 373 86 484 107 571 594 77 576 284 206 6 229 18 335 197 502 3...

output:

380170451
165637193
404394005
19986474
504362790
827239990
236529866
927862787
660136485
85895848
969666660
51352979
542881083
726323278
73027337
232676393
383938909
811679896
557444195
483214779
411391896
529933998
283984129
317212455
276642892
638148817
364390559
511002988
227665815
250125053
8478...

result:

ok 301 numbers

Test #176:

score: 0
Accepted
time: 0ms
memory: 10036kb

input:

300
461 314 521 121 267 383 533 288 250 556 99 338 368 452 1 289 339 356 136 111 122 330 510 370 89 244 39 226 351 418 82 18 312 500 388 74 449 231 390 480 106 528 76 290 504 97 295 151 277 469 337 181 214 270 160 424 169 186 474 598 260 574 31 542 333 453 236 107 209 232 184 308 419 102 505 378 423...

output:

160995900
298617332
193519765
563387628
407350407
66247194
599912542
425575443
283912737
177499380
758801546
168823140
611690286
681413543
275217034
697031858
207803830
622283878
787578058
441639863
526331333
491526893
791994367
880328898
792185432
456016524
212658975
660987032
688080639
966687385
6...

result:

ok 301 numbers

Test #177:

score: 0
Accepted
time: 2ms
memory: 10100kb

input:

300
197 222 550 247 27 388 359 477 202 165 163 232 565 367 302 428 142 231 327 357 573 456 32 171 209 400 233 58 414 24 9 140 73 130 587 499 392 257 77 337 474 484 572 563 420 442 96 275 164 351 65 261 370 485 252 187 546 401 495 210 155 71 561 412 263 192 576 554 481 292 377 440 159 177 112 457 364...

output:

396682168
116825693
860703114
779322373
96965857
71307832
74268130
140910523
385778308
601843524
393341295
248110305
820867853
557497769
556425486
251471439
919285174
50211146
685348901
405059135
626694113
889629297
307992435
865105104
627991470
557883215
623991714
296486004
220855955
66879880
28608...

result:

ok 301 numbers

Test #178:

score: 0
Accepted
time: 2ms
memory: 10004kb

input:

300
590 415 550 497 541 138 197 555 35 203 74 330 294 306 512 93 194 552 459 202 187 505 451 391 357 540 126 359 468 33 509 583 421 498 506 241 179 129 597 560 383 98 393 9 156 230 361 8 137 105 139 425 11 253 312 115 553 324 373 300 25 170 507 482 173 297 551 503 570 351 220 43 557 533 477 585 252 ...

output:

286909914
347145482
12406286
147711855
310072904
926431768
817328307
305029719
305029719
355249202
789182331
175381519
498167982
52235733
33705988
879821659
60873651
971239014
394010447
820359616
313502004
160089267
170319717
541238172
991954243
646300870
557034345
423824977
802527076
558850866
7145...

result:

ok 301 numbers

Test #179:

score: 0
Accepted
time: 2ms
memory: 10012kb

input:

300
23 579 276 425 163 89 295 521 486 235 104 415 402 470 385 167 337 40 53 9 34 109 119 363 566 55 458 291 248 325 282 244 216 520 345 62 350 138 64 353 394 145 303 265 547 558 3 528 359 455 211 6 298 406 18 185 79 540 511 530 83 408 441 576 397 172 563 323 348 333 230 343 148 91 327 131 251 102 34...

output:

347401273
350829959
915846356
898403525
681195068
388128180
346974725
604073636
862328424
846775273
100155962
648117638
392808636
851744709
133076028
0
235142558
865392725
748207732
650167981
502797695
593811902
897420003
605278134
511955953
828528401
264479519
222551552
83479631
739134640
796545
50...

result:

ok 301 numbers

Test #180:

score: 0
Accepted
time: 0ms
memory: 10520kb

input:

300
578 445 487 587 424 476 388 561 258 364 344 592 505 406 59 550 518 413 583 9 66 67 512 390 481 396 30 291 284 455 211 466 385 317 148 139 305 35 137 14 354 503 451 221 196 510 200 156 206 365 345 373 168 573 408 312 285 426 140 267 325 471 379 143 254 498 145 514 98 48 440 593 259 448 56 175 299...

output:

736226975
878887143
985335083
418301216
79232795
721529977
380620974
866490551
664000387
359671299
38179502
940775640
986753397
743677550
959081153
647607478
637609953
646677656
64603220
202777885
523328031
207419079
618277915
190067174
459334727
316354797
89358666
424886848
93918327
731388432
79929...

result:

ok 301 numbers

Test #181:

score: 0
Accepted
time: 2ms
memory: 10052kb

input:

300
354 153 93 68 189 41 470 310 355 363 87 434 328 445 152 519 110 415 213 74 90 222 372 230 266 112 534 224 346 484 515 302 267 579 446 181 419 537 28 21 67 471 494 31 7 348 317 232 201 314 223 421 457 369 347 236 123 5 122 291 439 286 154 521 395 522 88 460 62 290 548 200 390 593 412 268 228 143 ...

output:

238450218
473649112
735498544
375171294
453067823
6817730
228147305
613626885
163201607
832591754
652087806
38273859
915531058
0
321216665
443934951
133908321
195719968
330562686
425307454
776108040
129997921
617287597
104027082
874985702
198078546
804051156
510385937
898073289
713907239
460382970
7...

result:

ok 301 numbers

Test #182:

score: 0
Accepted
time: 2ms
memory: 10068kb

input:

300
180 306 485 336 112 73 267 74 189 434 15 202 577 184 108 533 192 132 357 48 393 471 399 8 123 445 369 386 415 11 526 578 331 597 519 539 38 379 283 368 26 85 428 209 534 219 476 427 430 363 276 259 23 513 456 206 407 396 225 516 355 4 265 207 258 517 378 528 481 365 345 470 194 344 170 405 525 3...

output:

831347350
750043127
416253327
263766726
779499159
956694530
917804288
343381801
114901166
623343225
906670723
778690591
316417113
492815673
171001927
104362383
939654646
276932745
818595772
578133307
985317057
821690134
502407896
945233833
416101283
104397777
692690294
126144492
295378457
306658878
...

result:

ok 301 numbers

Test #183:

score: 0
Accepted
time: 0ms
memory: 10068kb

input:

300
333 443 292 512 254 405 180 516 57 594 495 515 217 467 315 445 207 432 568 506 591 42 475 113 142 139 265 364 185 518 49 375 271 97 447 599 270 464 415 24 535 483 294 227 50 79 373 359 168 311 439 194 388 404 491 517 391 324 558 206 429 161 278 444 191 584 440 296 531 379 567 81 89 14 208 557 6 ...

output:

661219745
163059567
2198108
326776398
525187136
922243785
17024901
517174564
142263621
420155277
353172805
832385614
977883669
857741296
687946729
573593531
840017102
23697728
737429095
472117160
436155190
572135780
680886488
213276085
432605869
763523357
45971716
115233331
754102335
553893171
49771...

result:

ok 301 numbers

Test #184:

score: 0
Accepted
time: 2ms
memory: 10024kb

input:

300
381 428 333 58 19 293 211 556 386 491 227 297 277 158 594 340 55 503 278 586 567 311 582 107 388 138 543 445 173 581 167 305 405 310 69 448 499 318 27 283 542 322 487 497 583 418 115 168 20 415 187 200 118 554 300 414 87 463 326 432 486 198 355 206 14 214 316 384 521 140 212 241 195 248 197 154 ...

output:

179231693
144225054
273769770
461754553
817844531
829326693
862544973
435993633
30838212
425395100
474710556
798926189
582412222
434930434
952161979
274589783
223546632
695833710
139723724
478042085
986523968
620914857
804648766
540485409
526340495
149492272
94266132
357628141
42774126
867498509
950...

result:

ok 301 numbers

Test #185:

score: 0
Accepted
time: 2ms
memory: 10084kb

input:

300
195 118 275 383 450 523 39 211 472 528 448 285 22 355 187 110 257 50 455 6 238 513 199 490 107 119 172 371 498 169 181 590 505 186 30 572 201 141 314 532 445 592 443 436 479 358 548 458 103 570 290 511 336 112 496 361 412 232 426 543 218 357 451 477 397 408 41 581 296 53 489 304 525 529 29 203 2...

output:

271984221
10263004
504466914
650500415
208153390
401115009
15451894
322899233
492854292
587619082
796542561
466907353
939001071
143867372
336829780
290213400
950323119
854538846
878762716
614488123
55127739
121215654
424309610
602480424
483204646
323653661
305013857
171396571
161927099
417493206
181...

result:

ok 301 numbers

Test #186:

score: 0
Accepted
time: 0ms
memory: 10104kb

input:

300
188 143 238 117 234 333 434 259 102 44 111 12 279 495 139 523 560 328 84 230 339 589 147 281 97 480 185 309 469 182 224 561 409 280 167 77 121 408 120 348 5 373 393 308 25 65 398 240 3 553 588 452 539 551 35 29 304 292 390 91 20 372 301 208 596 355 357 104 48 466 170 586 427 293 204 51 135 320 5...

output:

113366380
657518726
378170556
671145229
59006728
688554218
944057555
55555889
558589220
656759394
653434264
981838163
851224125
213963947
955025649
213212989
726315076
135365479
755004802
939027613
820633436
833927668
331710711
708371854
671216885
817327101
282634822
216476168
321009044
501098628
48...

result:

ok 301 numbers

Test #187:

score: 0
Accepted
time: 2ms
memory: 10060kb

input:

300
536 467 73 349 578 509 198 434 93 408 569 589 262 45 149 76 587 483 8 596 537 345 332 42 283 582 523 133 376 174 372 105 173 331 209 102 457 383 403 148 399 290 445 226 237 230 242 233 518 48 224 195 46 253 308 6 588 135 258 310 153 309 1 63 122 64 547 203 414 74 199 575 507 521 218 15 292 503 5...

output:

662273275
8746250
425472026
563910747
874225353
545389908
96473479
56400107
776459648
305607521
575245262
677214709
914595871
635488583
224995812
621297270
980819421
383190342
979391118
539090685
350296774
57426928
342890044
156772541
430255417
954358487
578218028
527017603
951478997
677060715
83975...

result:

ok 301 numbers

Test #188:

score: 0
Accepted
time: 2ms
memory: 10008kb

input:

300
244 589 219 421 157 255 519 268 433 540 359 446 384 205 329 528 327 588 424 387 328 136 386 241 152 371 305 418 220 246 558 237 417 544 381 87 523 462 75 49 579 240 594 263 402 330 382 458 271 284 574 10 335 108 445 30 337 234 17 297 354 295 320 86 575 9 306 525 147 472 362 535 475 85 580 69 185...

output:

275849471
614664523
753134726
549878148
658900970
303032855
767537728
748196087
261503173
727819476
71368708
983307410
835590275
832885905
581949737
33721704
16832325
334531760
793274386
716546347
640001341
641312004
126200887
26936793
578792621
205163828
767156422
820802467
802538218
513787050
2028...

result:

ok 301 numbers

Test #189:

score: 0
Accepted
time: 2ms
memory: 10080kb

input:

300
83 117 231 19 520 434 360 301 101 220 333 251 63 570 551 97 21 191 498 463 454 45 588 548 243 201 306 332 314 155 568 407 537 204 486 114 373 478 22 349 419 235 556 334 137 337 497 594 541 194 378 190 456 139 141 193 371 302 527 78 470 489 321 125 491 555 445 216 547 115 546 308 383 443 330 18 2...

output:

234093546
791520711
6110949
691734828
656322226
974101714
369756785
824429568
786622490
647677106
767449514
539066955
892210252
363894438
688824354
366802311
374768198
447196415
983059600
845201186
449225498
422358406
36825289
808943021
321621751
105116061
955330661
626269574
834808852
259061040
426...

result:

ok 301 numbers

Test #190:

score: 0
Accepted
time: 0ms
memory: 10016kb

input:

300
221 346 326 5 189 145 134 315 473 317 320 131 12 492 335 502 416 304 532 393 526 410 560 251 210 266 99 161 577 125 178 429 309 27 150 264 541 78 381 24 79 439 347 217 88 184 586 389 484 402 154 26 67 530 297 581 53 62 63 559 357 424 223 81 303 338 233 576 386 271 239 579 361 520 294 564 490 28 ...

output:

822056920
736405890
658197001
5337852
504124230
709878109
933428078
429625238
838052775
540481409
195673231
621234121
422657960
884032766
478453596
520833854
173104908
442445665
230265371
83780765
302075263
174520745
16170343
735224259
2354721
220444467
412824523
552565762
90193722
980691383
7160202...

result:

ok 301 numbers

Subtask #8:

score: 20
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Dependency #5:

100%
Accepted

Dependency #6:

100%
Accepted

Dependency #7:

100%
Accepted

Test #191:

score: 20
Accepted
time: 74ms
memory: 137672kb

input:

5000
2356 4928 2720 6297 1725 2501 3911 8943 2941 1795 4954 7569 7112 1299 3226 6659 169 2969 7042 7996 9131 2342 8487 7894 4541 3627 7583 7847 870 4842 671 2903 4870 7824 8218 2406 5276 6280 7493 9912 2794 3234 9838 4495 7449 2943 5768 9729 18 3373 8183 382 4905 7764 7528 1809 1151 3216 1729 4238 8...

output:

820685528
41913901
364980696
41192555
295840704
161887730
474561143
561018711
561999113
309618233
331645051
459267553
546226201
832871064
354233495
452903183
258821839
643999238
164510442
53076217
363598476
159864081
167596609
315689908
916268729
634795046
835064661
237804251
190039941
210132967
499...

result:

ok 5001 numbers

Test #192:

score: 0
Accepted
time: 64ms
memory: 138008kb

input:

5000
9682 743 1644 2687 1701 6393 2263 8066 6181 4975 2148 2037 5270 2185 7148 4263 1474 2287 8719 3916 6954 9256 2607 8822 3390 5779 4688 8519 8869 3799 8559 6934 6190 7748 7619 2633 5388 2323 8188 1153 2875 8412 4210 5980 3478 2902 2669 8276 9989 4803 5612 8333 4556 5701 6536 4997 9208 9531 7471 9...

output:

405165385
443436371
350391246
786722151
73330370
438157773
769500131
577068863
733191323
949855058
769800630
98456086
739146008
53464436
102963270
160916367
401316478
375448158
529485758
495800337
821759906
193429482
331829967
239453853
539704923
534781908
775759446
832781767
422784760
481807215
380...

result:

ok 5001 numbers

Test #193:

score: 0
Accepted
time: 59ms
memory: 137400kb

input:

5000
536 1619 3176 7891 462 4317 1471 4657 8138 5814 3880 3845 7893 9868 3939 3605 9224 7504 3436 4068 7385 2938 6501 675 2864 1713 8281 4491 5232 4049 8953 3872 8148 6651 8276 93 1202 6220 9866 800 9726 3049 6429 952 8751 6652 1594 9684 3062 7885 9137 2459 8323 9665 7965 5416 6878 3468 7621 8628 53...

output:

354599805
759821633
954367580
197229176
368037624
104882387
551021483
253410945
111481570
653938269
119706090
917750774
462212449
398271687
148859002
218969504
205957178
333569863
991142768
41115137
840180787
823397846
962056487
833126628
7374853
975205334
558454935
430188549
129321581
925759079
842...

result:

ok 5001 numbers

Test #194:

score: 0
Accepted
time: 68ms
memory: 138104kb

input:

5000
4638 9219 3094 3713 7304 2427 2258 6987 7146 4441 6896 9325 2467 309 9060 3891 2051 3413 384 3978 1584 6797 1801 1589 1084 470 9899 5107 8367 1865 4363 1392 2736 2123 8311 5885 3985 2309 6742 148 155 8581 584 9373 5628 2964 4598 6320 8072 7802 8013 1519 3668 4553 657 9610 4366 2082 8734 5925 36...

output:

163537653
555641664
883544614
952264020
956673108
793696347
502458822
208127928
447486636
299501837
44691089
248278734
492321973
725131808
274636219
498039279
381283829
64045564
230676853
959387245
806434306
376348653
523939256
834386449
538352342
916214283
544099770
206036315
608222861
63976328
577...

result:

ok 5001 numbers

Test #195:

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

input:

5000
4832 3757 4494 3610 6416 2573 1694 663 6983 3445 6631 1480 5140 111 8647 9500 8360 5645 5662 1525 1946 6162 9792 5919 6287 1626 8675 9095 7940 3908 114 9208 3198 3637 6297 7994 1843 3292 634 3802 716 8331 1814 370 3326 4652 2487 6484 964 2406 7435 8944 9937 6171 4077 6184 2336 1931 4281 9740 56...

output:

639150194
603169147
732736830
555136114
696406169
713553598
208022098
207997775
690593386
281720824
213431743
543192226
216848159
348807498
582147243
191494260
231155300
994368833
578056940
42093331
812603857
614436412
533363582
162647308
963747512
370004415
897391147
460538625
35226089
267580049
40...

result:

ok 5001 numbers

Test #196:

score: 0
Accepted
time: 63ms
memory: 137496kb

input:

5000
7331 6433 3016 2476 2527 1611 7622 5590 9499 5648 2425 5527 7553 8035 2715 4695 6625 5324 9033 5873 2056 2765 2513 7835 5192 4850 4123 6415 3446 1272 5599 29 5375 430 3196 5488 6906 5203 4287 5958 6784 522 9109 2092 8729 7685 2228 4597 2371 8316 7096 7074 8741 7786 3593 6004 2269 2864 6186 3491...

output:

201264184
735393218
9365156
48897905
563005611
270773527
802302709
491372527
93625536
98340700
166978372
344906840
62404282
581909273
760394818
52024142
484719524
568822741
723791010
968819673
481720495
319443198
185003113
891763795
424585472
304026259
894951774
923968225
567577099
147135271
2679933...

result:

ok 5001 numbers

Test #197:

score: 0
Accepted
time: 76ms
memory: 137684kb

input:

5000
3636 1089 7939 9092 5556 3535 8429 4384 2390 1526 1500 6066 5196 2334 5397 5989 4802 2079 2310 8485 4522 9645 9067 742 4784 9248 5789 7581 2113 9024 9773 992 4253 5708 4028 578 4643 4991 86 478 436 9236 5177 5823 1653 4105 9660 5306 7423 7958 7826 5548 4141 3995 4682 1900 4728 3008 305 1755 209...

output:

421546168
312152975
692141668
967370482
626274612
645891256
898067546
99660920
834348798
460874242
568135049
155298218
162237655
108863077
956220731
140928782
89923154
586832679
797099333
788818400
458634848
490215285
347499444
592859721
745956088
621303135
237743112
501459798
787419694
541425369
49...

result:

ok 5001 numbers

Test #198:

score: 0
Accepted
time: 66ms
memory: 137648kb

input:

5000
4393 3049 2419 8487 6317 7604 9208 4193 5290 3577 3331 3143 5643 2094 2104 5901 4326 520 1625 8748 5263 5251 8260 3107 2985 6967 6621 1010 3634 8382 9927 8905 7027 6288 1927 9133 6641 8223 7616 944 8438 7953 5138 5145 2267 6425 7476 1271 7418 3500 4755 2730 1403 8744 7650 4198 345 3602 4075 138...

output:

717268551
564659519
271381665
710410923
12273626
408578401
887806624
399245944
163706503
623425124
491904538
358595565
191521152
505129027
191352322
876791590
697387069
107000261
981226793
277290978
305473857
283043637
191805488
270466538
655073950
415729375
376500761
827914641
280816510
730137339
6...

result:

ok 5001 numbers

Test #199:

score: 0
Accepted
time: 63ms
memory: 137348kb

input:

5000
8434 2829 7658 183 5694 7257 7495 3220 8352 6032 8389 9061 9846 2187 8624 2649 6425 6805 3345 2889 1400 2441 7201 909 583 1190 926 2991 3572 9825 5824 2398 2625 1515 104 5679 2272 8739 159 7352 6380 7935 3927 5581 8824 5011 4115 6069 9228 2788 562 6127 6472 215 9309 1322 180 8557 3491 449 6327 ...

output:

658844370
657150230
810698751
268080715
463986035
921231221
556497456
189888943
638842769
355680395
848066101
214442147
581310026
542261430
210233965
980858534
583615318
759572274
714058919
452080400
338404353
542718533
910172330
317391053
487094160
24451428
631289365
944258187
395002987
71725290
95...

result:

ok 5001 numbers

Test #200:

score: 0
Accepted
time: 60ms
memory: 138128kb

input:

5000
1350 1537 3652 3805 5146 1199 9340 3400 2108 3308 1282 7773 7918 996 7089 2350 8176 1234 2118 415 8561 3034 6359 5754 7989 5339 8566 1596 3138 311 9847 9600 4106 1854 6496 881 256 9474 7403 1642 2835 5929 6036 8474 1981 6210 9630 3841 10 8632 1137 5247 653 5074 5918 729 3149 5991 5244 481 6739 ...

output:

62861356
386698752
748987965
307163016
150453704
516221141
576302102
163614908
801797183
376442620
758495238
751450936
893607087
463532271
85799598
722235891
357292971
53786870
465600171
329319033
811548408
656503149
49189346
262108850
13825059
974803165
46240639
289156470
980573525
555236594
365343...

result:

ok 5001 numbers

Test #201:

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

input:

5000
5355 5778 2012 5647 893 6117 4751 7187 4553 6096 3637 1586 2741 4029 4383 6865 6082 8465 8336 8443 1799 357 4832 6491 999 557 5487 9807 6217 1702 4155 3643 345 7580 8813 1120 6990 7693 7037 7211 752 1818 3703 1636 6807 4647 9601 2817 5655 5846 182 3873 2685 6458 9636 8914 2090 5880 2355 3074 39...

output:

675167958
604695422
479989699
348520570
456246096
499067569
645680225
707020536
219663938
945882804
401104797
612462802
125826103
787443076
745133923
404741851
788132022
273850685
522014256
715953098
985811105
96300666
158925775
461677962
977189754
559799395
328024025
524913998
151630338
590510385
7...

result:

ok 5001 numbers

Test #202:

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

input:

5000
8943 544 9940 1762 852 2632 3444 6243 7312 5271 7038 5835 9417 3016 7152 3443 4949 977 9324 3764 7435 125 5488 5615 5469 5834 1912 7667 9809 4931 5455 2233 6240 6226 5009 9489 8273 4051 4728 442 1693 4828 844 4025 4760 1231 854 1539 5637 3177 1847 2666 3451 3187 6253 6812 5358 6393 3170 2639 22...

output:

299509082
827385947
371045804
701817967
988163879
979677643
649061929
3899646
890968151
158198518
739181717
537692229
612393810
455868427
304479106
182270449
633151818
752228490
589659104
67693991
498527810
938491758
416889762
706932188
109568848
399540776
128298420
50791152
214079978
689122203
5632...

result:

ok 5001 numbers

Test #203:

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

input:

5000
6005 2830 575 3503 9210 9960 4402 1359 9194 6621 4280 4253 568 7235 1424 2613 9545 4344 4140 7706 5649 5456 6662 2786 9913 5919 3207 223 83 6503 7132 3948 8455 3531 8605 4999 2698 6859 703 4545 2435 8724 4065 942 2504 5147 9733 2431 673 6536 2918 4138 2849 1112 4738 7492 4984 3449 6512 2513 713...

output:

821287551
146417190
333331411
392559568
240967387
501303229
248197320
781200809
156876531
482297183
804756094
731012300
284543062
630376184
827228153
779202104
323163419
199010541
615739134
510904259
254439235
327082672
802766133
269209229
274039198
509666581
823122219
190599056
341646159
307571676
...

result:

ok 5001 numbers

Test #204:

score: 0
Accepted
time: 63ms
memory: 137296kb

input:

5000
8963 8032 8851 6424 97 1340 3039 715 6873 5437 7846 3407 1104 1433 9466 878 3714 3386 2921 3608 1957 5612 7068 9750 3566 5550 9136 9937 6 1890 1431 3366 3103 3804 9152 4876 9546 4520 1875 6070 7613 5499 7803 2401 7535 7192 2705 4746 7416 2902 1490 6262 7517 2113 5058 7437 5504 9160 9965 3012 46...

output:

48969695
410258762
883532336
110942096
703001935
444977040
64813354
873287724
907108144
33571387
82861965
386400395
814281219
207939548
119611435
193658527
45499015
25268462
546211947
924287174
930450989
420389869
630579573
12558180
384653369
290217145
453569374
617953270
213528866
803022081
2719520...

result:

ok 5001 numbers

Test #205:

score: 0
Accepted
time: 71ms
memory: 137264kb

input:

5000
3753 228 5584 7339 7232 2893 5506 2454 8243 5979 6613 7962 4723 6518 1594 9691 3869 6590 9460 5193 109 7365 4892 5520 8730 2760 6153 7014 2559 1590 2956 3932 855 9641 2269 9445 1162 821 8460 8862 6281 7244 9745 6354 3936 1844 5224 8820 1179 5805 8954 5308 4489 3442 3068 7964 9198 7629 5780 3009...

output:

30850032
15938084
125632773
358963655
274880002
738453203
952531830
280809189
281838739
269150215
225792399
609640063
447851367
156209042
448459952
795921604
257706260
611198089
156003030
608766435
643828139
223622779
687208299
539895973
843784727
14316525
66272404
664643122
362203072
393149385
1407...

result:

ok 5001 numbers

Test #206:

score: 0
Accepted
time: 72ms
memory: 137752kb

input:

5000
4717 5927 6577 1071 3631 414 9727 9058 3298 2501 1081 5044 4788 3392 9354 7246 1933 8901 9506 3830 8893 1571 4172 7298 8781 7944 5227 1376 7328 4050 2976 6089 1213 623 1662 8287 492 1044 6780 6255 1533 4460 9891 2720 8619 5130 7612 9711 7775 8401 1134 3111 2963 7221 1014 1374 9156 4886 1928 286...

output:

135539104
320088887
749755434
323237247
710695802
649975363
220514222
992899921
511886935
106340975
807714019
434933957
286153581
610561632
162563715
124075721
244240861
935670720
603655256
905064676
546770659
41496045
740670478
185603988
945295679
518080820
214211620
643739675
746605706
913595334
8...

result:

ok 5001 numbers

Test #207:

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

input:

5000
7204 5065 4028 4966 2309 6099 5463 5894 8415 9983 5782 6790 7891 6980 8412 5576 1148 284 1228 6262 7139 9961 4657 8144 422 4644 3298 1004 7700 8299 2701 5660 1648 187 886 6453 946 8388 8686 608 8143 2363 2019 8292 1698 1263 9582 6988 9777 5035 7469 3751 1990 5509 3066 6873 5750 4435 7754 1639 7...

output:

749021539
222248645
637227868
883986058
261640592
939648211
372395997
80409347
592506189
699129259
544118011
149661526
74937530
208920068
998029909
733539244
130810991
921565295
308540399
404981111
870425842
678740285
184030789
315148445
512232029
811119306
387394133
915465005
426405101
74871796
546...

result:

ok 5001 numbers

Test #208:

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

input:

5000
6137 5571 9164 5823 2106 3460 5370 2629 304 810 185 3659 3219 7140 291 6106 1632 9752 5329 2770 2151 1219 7137 5021 7059 1598 1337 4801 5417 6387 2812 8733 581 4151 4030 246 4075 655 3932 7691 9153 5794 6213 4655 3303 5826 9737 3086 6870 4561 6923 1864 623 3811 9212 6406 211 484 5755 7614 859 2...

output:

570147532
938386208
30467576
420301232
790833640
503534695
265391305
202081463
290399047
398972911
57866388
522024567
460259526
441500070
147380293
508593852
173356528
150213599
959651891
198442862
980892774
116046519
209254568
179410215
71119580
337265394
991849004
699518590
922711770
287164230
382...

result:

ok 5001 numbers

Test #209:

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

input:

5000
5791 6200 3676 4622 666 5510 3297 1562 3473 185 3725 250 4582 9652 3291 6013 9164 5698 3956 3299 1209 3863 7618 6525 6561 568 7652 9950 7565 3217 8197 1516 3592 5383 3575 4350 558 8545 366 8581 1027 323 2780 5462 2641 9211 8104 8999 6233 4901 9636 4780 7005 917 8775 7484 4233 6428 9646 3132 84 ...

output:

725774001
266197891
784625140
840631097
329425463
232729855
847849723
375923891
152751728
425598280
304666232
739689539
444409703
757094706
214586009
246643708
936913462
168695830
947998144
896979200
804969339
842614830
732560956
330784376
730991117
541872803
484458423
238364944
12991183
451289450
6...

result:

ok 5001 numbers

Test #210:

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

input:

5000
5095 915 9040 5885 1133 6430 1538 417 6454 5262 6744 4421 5658 5260 5148 4405 7761 2048 2258 8263 1834 2624 3235 6852 1971 6772 7946 2248 5301 4418 3190 7357 6803 8523 2196 3219 5718 9733 2511 5074 8777 9962 5901 5387 5498 7581 9789 550 6494 873 1779 1426 233 3207 4701 7457 3664 8073 3669 5308 ...

output:

921639277
836787415
905722637
49330210
40405890
34447552
92228497
678870092
353941519
389462426
948411739
175339031
72374049
578891618
342609910
339765190
880507230
668400208
970950095
560554580
635844805
134905649
110014675
205844287
557203673
779809466
990026383
13357684
720221226
222738718
804049...

result:

ok 5001 numbers

Test #211:

score: 0
Accepted
time: 59ms
memory: 137824kb

input:

5000
9790 1998 9649 8674 513 3084 2785 8621 5383 4009 8476 9524 1620 633 8062 1996 1485 890 4471 5862 2895 5713 9744 763 103 6202 2797 5475 9073 2166 9426 2284 6439 5071 3776 836 9594 3856 6834 2418 8092 8105 4120 4634 5993 7272 3522 8792 5810 8806 886 9268 8437 3761 5113 5723 293 8735 4331 2266 342...

output:

594008589
32634693
789217167
99332032
370837823
504186385
962203069
17131874
557489194
127325320
631482419
249885881
199638664
833374686
95491340
552520253
799120681
261135002
701240497
331064745
947955722
949127542
664372269
284381588
417733133
582561023
780579188
985505095
993605311
479465959
7976...

result:

ok 5001 numbers

Test #212:

score: 0
Accepted
time: 52ms
memory: 137896kb

input:

5000
8154 9943 1265 7999 4905 5008 3588 4704 8905 2487 4739 3851 5353 4690 7596 7026 4191 8840 5158 1239 2512 5608 7090 8968 2064 6244 2714 4429 3178 8290 9314 6455 1832 3155 1516 9673 1803 3421 3769 4935 5759 6839 3429 927 4280 1797 8778 9847 3962 9384 8699 4919 2641 2094 3582 411 8871 197 7911 805...

output:

356270556
695584224
769671470
549040230
782064122
342123107
448794510
800487309
831450603
841294784
731291608
730524811
454467453
882607274
864074718
869678414
99476090
525445717
674880303
572539698
640392892
359349264
947545900
7498234
45978111
166846154
778318257
655429554
746711029
897762753
1988...

result:

ok 5001 numbers

Test #213:

score: 0
Accepted
time: 67ms
memory: 137252kb

input:

5000
2150 6774 8705 2340 4457 9805 2302 165 4234 3403 5577 8065 2122 8421 2685 6356 5218 7939 5455 1258 5623 4255 3420 9122 3479 2265 447 7882 1911 6428 1749 9933 7824 9825 709 1994 4899 8121 2197 4088 4725 221 6865 4941 9772 4721 1910 8195 8100 8986 4381 8376 7109 3978 6416 3136 1498 760 3706 1341 ...

output:

670279962
556949432
687276046
78516500
572661812
491650084
319012076
845102070
424626746
377075407
126279517
478989775
164723856
920898998
495555333
476074075
884066779
176742423
402558315
423572065
929352160
258007477
716085348
570764966
489312797
301871004
683666448
793364280
788443020
50451328
56...

result:

ok 5001 numbers

Test #214:

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

input:

5000
1763 1659 9245 6595 6212 2516 9067 1152 8734 8175 9508 1041 3044 1356 1250 1953 8954 7061 2338 2110 8816 8536 991 1013 5655 9603 4317 5602 4172 3348 2379 3721 3595 9101 8086 7639 4991 9561 8126 6769 7297 2373 5454 137 481 7105 8759 577 2803 2591 6329 3854 9151 1358 1137 5519 5163 123 2007 5539 ...

output:

902965449
965664303
277819730
458823473
740356583
521459121
214358686
549558265
414222019
572915950
30619077
528034999
209044630
615355571
45890963
9120281
316008681
406667949
258894115
283063600
120863793
513082369
615355571
423669234
121659292
119519524
69001871
338593232
284047188
198704139
15909...

result:

ok 5001 numbers

Test #215:

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

input:

5000
5796 3574 7204 2863 5102 9356 7009 534 1775 9618 4764 3285 6388 5939 9220 8577 1943 6778 1841 1741 858 2327 9877 8684 7995 3223 9047 5730 4501 8818 7387 8815 7309 1447 5771 7130 9281 6807 5570 3367 18 8175 629 5411 6882 3271 6942 2682 4455 2997 8916 3158 2363 1379 8172 6876 7446 3825 905 4020 3...

output:

372886405
280376134
873909016
318068363
947857674
625288602
735958733
158083227
948143109
196568119
811608412
168529815
234343477
565932469
968347382
275258349
871595109
261868097
790785244
573028399
194218425
112559853
209182999
30253048
935619124
50969419
785410490
253997848
495820145
327744686
55...

result:

ok 5001 numbers

Test #216:

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

input:

5000
7483 5910 7962 4848 3991 4059 890 208 5938 5785 8311 17 5160 1536 8139 4709 8802 968 1802 8508 1483 5562 7388 6055 5086 2961 6117 2849 8130 3504 9734 6070 4951 6861 5513 8437 1297 8914 5896 6206 3305 8234 9262 6322 790 9966 9595 1540 5446 7848 874 8646 2071 6265 7368 7829 1566 4789 7513 4551 92...

output:

913990085
942786131
824340648
528812501
444424090
26377340
821084852
55728053
78054898
884128924
542918867
870699792
512147009
327499715
809633544
54446307
562081581
933067250
738577920
571555323
784520355
229578604
948365821
898637170
360623037
321479408
394961412
752923124
408148283
16814772
76536...

result:

ok 5001 numbers

Test #217:

score: 0
Accepted
time: 65ms
memory: 137668kb

input:

5000
7781 5788 5877 2066 5527 7828 4412 6539 7921 6497 9802 2541 5785 6710 7187 9207 4097 1070 2358 4024 6645 8303 5598 5597 6609 1891 9446 6077 5622 6510 4597 838 8392 509 697 864 9075 732 8994 1286 4824 8099 708 7366 8033 9939 2021 6575 9972 3109 494 2422 9846 3294 3889 6661 7382 6867 233 4084 152...

output:

844174224
66511898
577526951
375861286
791300897
157223021
905882854
702915325
114576696
533329673
183335202
452990047
573571025
922940770
982197744
639518861
36678243
436739125
489636207
566709761
160942766
349912313
117513354
266103419
926592661
76182828
379688339
611669887
540051528
831722439
681...

result:

ok 5001 numbers

Test #218:

score: 0
Accepted
time: 65ms
memory: 137568kb

input:

5000
3539 6415 2014 2690 5069 6014 2801 5743 8212 4709 7467 5164 3205 372 3795 2284 6776 1938 6475 3004 8199 8542 3314 4571 8948 8081 5805 8466 3074 9477 2146 296 6180 5064 8537 1110 3261 9241 753 3376 3595 8457 1997 334 2981 1502 3129 2102 8214 2543 3743 8348 8973 7668 8338 1856 8366 5537 1881 3366...

output:

614507881
904558328
499022658
105649006
859929770
316656852
577390801
316790143
967170647
131858721
822986471
881558718
617245158
389423147
507609186
884287512
968245788
94916899
755365188
994646022
886402610
53160224
343222578
899358276
241902788
539596470
621559494
169113312
536774548
629317300
45...

result:

ok 5001 numbers

Test #219:

score: 0
Accepted
time: 68ms
memory: 137164kb

input:

5000
4471 9495 113 3944 585 7080 6267 5694 4867 8930 8445 7147 4583 7753 3980 7700 4286 9659 5440 1295 8873 5303 3120 5924 9065 7650 7090 637 882 7457 185 8117 3338 5334 3741 9649 2292 7455 3456 3309 9494 8800 1664 663 490 7526 2837 8877 3537 9886 7288 6403 8390 9417 1359 5545 4603 2713 3959 7997 39...

output:

93096270
452258153
433486943
836872287
741357787
591643134
354564798
712670511
981099294
220817748
959289206
811400271
516580196
292262281
156748721
471450589
468771652
668846916
26849605
890464542
110098142
205853101
21773214
110114849
507133316
346970145
157176713
381688266
37905678
201108876
7391...

result:

ok 5001 numbers

Test #220:

score: 0
Accepted
time: 67ms
memory: 137968kb

input:

5000
486 3259 9924 9442 5631 2167 1938 2165 2316 5349 4355 7974 6432 6550 542 5804 4565 2409 7913 4817 6623 503 7840 4914 9854 7842 4009 7523 3779 8475 2428 2567 9923 5655 251 5049 6277 7173 4061 2204 9994 910 6549 1 9300 2707 2369 5456 2667 5198 5113 2209 5260 3275 1098 3949 5225 5820 3985 5967 132...

output:

183085871
803442833
752415013
916002209
33649259
723219170
747967785
495300714
582978472
747670487
281052746
200302476
231633485
772912402
931394631
728241414
841188484
978192696
808534217
321293300
539843488
597296834
905435980
404878255
631753361
978301703
569255113
482927401
521864695
806072963
2...

result:

ok 5001 numbers

Extra Test:

score: 0
Extra Test Passed