QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#402027#8601. Герої та МонстриdXqwq#71 102ms199460kbC++231.1kb2024-04-29 19:26:252024-04-29 19:26:25

詳細信息

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 47ms
memory: 199288kb

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:

wrong answer 827th numbers differ - expected: '1', found: '0'

Subtask #2:

score: 9
Accepted

Test #11:

score: 9
Accepted
time: 60ms
memory: 199456kb

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: 9
Accepted
time: 35ms
memory: 199292kb

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: 9
Accepted
time: 52ms
memory: 199284kb

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: 9
Accepted
time: 42ms
memory: 199348kb

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: 9
Accepted
time: 51ms
memory: 199268kb

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: 9
Accepted
time: 39ms
memory: 199272kb

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: 9
Accepted
time: 51ms
memory: 199272kb

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: 9
Accepted
time: 48ms
memory: 199400kb

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: 9
Accepted
time: 43ms
memory: 199316kb

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: 9
Accepted
time: 39ms
memory: 199336kb

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: 9
Accepted
time: 57ms
memory: 199344kb

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: 9
Accepted
time: 57ms
memory: 199352kb

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: 9
Accepted
time: 47ms
memory: 199336kb

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: 9
Accepted
time: 44ms
memory: 199360kb

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: 9
Accepted
time: 40ms
memory: 199316kb

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: 9
Accepted
time: 47ms
memory: 199268kb

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: 9
Accepted
time: 35ms
memory: 199360kb

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: 9
Accepted
time: 51ms
memory: 199288kb

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: 9
Accepted
time: 39ms
memory: 199348kb

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: 9
Accepted
time: 32ms
memory: 199384kb

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: 9
Accepted
time: 52ms
memory: 199260kb

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: 9
Accepted
time: 51ms
memory: 199384kb

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: 9
Accepted
time: 48ms
memory: 199276kb

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: 9
Accepted
time: 44ms
memory: 199356kb

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: 9
Accepted
time: 51ms
memory: 199332kb

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: 9
Accepted
time: 47ms
memory: 199336kb

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: 9
Accepted
time: 64ms
memory: 199460kb

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: 9
Accepted
time: 40ms
memory: 199324kb

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: 9
Accepted
time: 40ms
memory: 199344kb

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: 9
Accepted
time: 45ms
memory: 199344kb

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: 0
Wrong Answer

Test #41:

score: 0
Wrong Answer
time: 79ms
memory: 199328kb

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:

wrong answer 2398th numbers differ - expected: '651189440', found: '651189439'

Subtask #4:

score: 16
Accepted

Test #71:

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

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: 16
Accepted
time: 0ms
memory: 15640kb

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: 16
Accepted
time: 0ms
memory: 15648kb

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: 16
Accepted
time: 0ms
memory: 15508kb

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: 16
Accepted
time: 5ms
memory: 15528kb

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: 16
Accepted
time: 0ms
memory: 15704kb

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: 16
Accepted
time: 2ms
memory: 15608kb

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: 16
Accepted
time: 0ms
memory: 15636kb

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: 16
Accepted
time: 0ms
memory: 15528kb

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: 16
Accepted
time: 2ms
memory: 15516kb

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: 16
Accepted
time: 6ms
memory: 15524kb

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: 16
Accepted
time: 3ms
memory: 15592kb

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: 16
Accepted
time: 3ms
memory: 15548kb

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: 16
Accepted
time: 0ms
memory: 15604kb

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: 16
Accepted
time: 0ms
memory: 15524kb

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: 16
Accepted
time: 3ms
memory: 15584kb

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: 16
Accepted
time: 0ms
memory: 15544kb

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: 16
Accepted
time: 0ms
memory: 15608kb

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: 16
Accepted
time: 0ms
memory: 15576kb

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: 16
Accepted
time: 0ms
memory: 15512kb

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: 16
Accepted
time: 6ms
memory: 15636kb

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: 16
Accepted
time: 0ms
memory: 15524kb

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: 16
Accepted
time: 0ms
memory: 15568kb

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: 16
Accepted
time: 0ms
memory: 15604kb

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: 16
Accepted
time: 0ms
memory: 15596kb

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: 16
Accepted
time: 0ms
memory: 15540kb

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: 16
Accepted
time: 0ms
memory: 15524kb

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: 16
Accepted
time: 3ms
memory: 15588kb

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: 16
Accepted
time: 0ms
memory: 15524kb

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: 16
Accepted
time: 6ms
memory: 15516kb

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: 82ms
memory: 199336kb

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: 14
Accepted
time: 70ms
memory: 199340kb

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: 14
Accepted
time: 79ms
memory: 199276kb

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: 14
Accepted
time: 71ms
memory: 199332kb

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: 14
Accepted
time: 71ms
memory: 199332kb

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: 14
Accepted
time: 71ms
memory: 199348kb

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: 14
Accepted
time: 63ms
memory: 199336kb

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: 14
Accepted
time: 92ms
memory: 199400kb

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: 14
Accepted
time: 84ms
memory: 199348kb

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: 14
Accepted
time: 82ms
memory: 199292kb

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: 14
Accepted
time: 64ms
memory: 199276kb

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: 14
Accepted
time: 76ms
memory: 199348kb

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: 14
Accepted
time: 71ms
memory: 199452kb

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: 14
Accepted
time: 87ms
memory: 199280kb

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: 14
Accepted
time: 76ms
memory: 199288kb

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: 14
Accepted
time: 68ms
memory: 199332kb

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: 14
Accepted
time: 74ms
memory: 199456kb

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: 14
Accepted
time: 67ms
memory: 199336kb

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: 14
Accepted
time: 60ms
memory: 199268kb

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: 14
Accepted
time: 65ms
memory: 199336kb

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: 14
Accepted
time: 98ms
memory: 199316kb

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: 14
Accepted
time: 78ms
memory: 199268kb

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: 14
Accepted
time: 77ms
memory: 199392kb

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: 14
Accepted
time: 79ms
memory: 199312kb

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: 14
Accepted
time: 71ms
memory: 199272kb

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: 14
Accepted
time: 67ms
memory: 199332kb

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: 14
Accepted
time: 86ms
memory: 199284kb

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: 14
Accepted
time: 68ms
memory: 199276kb

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: 14
Accepted
time: 64ms
memory: 199392kb

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: 14
Accepted
time: 68ms
memory: 199344kb

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: 72ms
memory: 199328kb

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: 15
Accepted
time: 60ms
memory: 199344kb

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: 15
Accepted
time: 64ms
memory: 199328kb

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: 15
Accepted
time: 90ms
memory: 199284kb

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: 15
Accepted
time: 76ms
memory: 199316kb

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: 15
Accepted
time: 78ms
memory: 199392kb

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: 15
Accepted
time: 70ms
memory: 199348kb

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: 15
Accepted
time: 96ms
memory: 199388kb

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: 15
Accepted
time: 76ms
memory: 199316kb

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: 15
Accepted
time: 74ms
memory: 199348kb

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: 15
Accepted
time: 80ms
memory: 199304kb

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: 15
Accepted
time: 61ms
memory: 199268kb

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: 15
Accepted
time: 59ms
memory: 199280kb

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: 15
Accepted
time: 83ms
memory: 199388kb

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: 15
Accepted
time: 77ms
memory: 199392kb

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: 15
Accepted
time: 67ms
memory: 199336kb

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: 15
Accepted
time: 72ms
memory: 199336kb

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: 15
Accepted
time: 87ms
memory: 199392kb

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: 15
Accepted
time: 75ms
memory: 199340kb

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: 15
Accepted
time: 102ms
memory: 199324kb

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: 15
Accepted
time: 92ms
memory: 199396kb

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: 15
Accepted
time: 71ms
memory: 199264kb

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: 15
Accepted
time: 64ms
memory: 199340kb

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: 15
Accepted
time: 67ms
memory: 199328kb

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: 15
Accepted
time: 71ms
memory: 199228kb

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: 15
Accepted
time: 76ms
memory: 199336kb

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: 15
Accepted
time: 67ms
memory: 199264kb

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: 15
Accepted
time: 71ms
memory: 199312kb

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: 15
Accepted
time: 78ms
memory: 199264kb

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: 15
Accepted
time: 80ms
memory: 199340kb

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: 6ms
memory: 15600kb

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: 17
Accepted
time: 0ms
memory: 15644kb

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: 17
Accepted
time: 3ms
memory: 15524kb

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: 17
Accepted
time: 0ms
memory: 15564kb

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: 17
Accepted
time: 0ms
memory: 15584kb

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: 17
Accepted
time: 6ms
memory: 15576kb

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: 17
Accepted
time: 0ms
memory: 15708kb

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: 17
Accepted
time: 0ms
memory: 15528kb

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: 17
Accepted
time: 0ms
memory: 15580kb

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: 17
Accepted
time: 3ms
memory: 15600kb

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: 17
Accepted
time: 0ms
memory: 15528kb

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: 17
Accepted
time: 0ms
memory: 15580kb

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: 17
Accepted
time: 3ms
memory: 15648kb

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: 17
Accepted
time: 6ms
memory: 15580kb

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: 17
Accepted
time: 0ms
memory: 15636kb

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: 17
Accepted
time: 0ms
memory: 15532kb

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: 17
Accepted
time: 0ms
memory: 15456kb

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: 17
Accepted
time: 0ms
memory: 15524kb

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: 17
Accepted
time: 3ms
memory: 15604kb

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: 17
Accepted
time: 0ms
memory: 15512kb

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: 17
Accepted
time: 0ms
memory: 15524kb

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: 17
Accepted
time: 0ms
memory: 15640kb

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: 17
Accepted
time: 0ms
memory: 15564kb

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: 17
Accepted
time: 0ms
memory: 15568kb

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: 17
Accepted
time: 0ms
memory: 15704kb

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: 17
Accepted
time: 0ms
memory: 15592kb

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: 17
Accepted
time: 0ms
memory: 15588kb

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: 17
Accepted
time: 0ms
memory: 15652kb

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: 17
Accepted
time: 0ms
memory: 15592kb

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: 17
Accepted
time: 0ms
memory: 15516kb

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: 0
Skipped

Dependency #1:

0%