QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#632864#7724. Irreducible Fractionsmemset0AC ✓479ms4372kbC++23936b2024-10-12 14:06:162024-10-12 14:06:17

Judging History

你现在查看的是最新测评结果

  • [2024-10-12 14:06:17]
  • 评测
  • 测评结果:AC
  • 用时:479ms
  • 内存:4372kb
  • [2024-10-12 14:06:16]
  • 提交

answer

#include <bits/stdc++.h>
#define sz(x) ((int)(x).size())
#define all(x) begin(x), end(x)
#ifdef memset0
#define log(...) fprintf(stderr, __VA_ARGS__)
#else
#define endl '\n'
#define log(...) (void(0))
#endif
using namespace std;
using ll = long long;
using lf = long double;
using ull = unsigned long long;

const int N = 2011;
bitset<N> g[N];
ll a[N];
ll gcd(ll a, ll b) {
  if (!b) return a;
  return gcd(b, a % b);
}
ll C2(ll n) { return n * (n - 1) / 2; }
int main() {
#ifdef memset0
  freopen("I.in", "r", stdin);
#endif
  cin.tie(0)->sync_with_stdio(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  for (int i = 1; i <= n; ++i)
    for (int j = i + 1; j <= n; ++j)
      if (gcd(a[i], a[j]) == 1) g[i][j] = g[j][i] = 1;
  ll ans = 0;
  for (int x = 1; x <= n; ++x)
    for (int y = x + 1; y <= n; ++y) {
      ll f = (g[x] & g[y]).count();
      ans += C2(f);
    }
  cout << (ans * 4) << '\n';
  return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

4
1 1 1 1

output:

24

result:

ok 1 number(s): "24"

Test #2:

score: 0
Accepted
time: 1ms
memory: 3552kb

input:

6
10 11 2 4 5 7

output:

96

result:

ok 1 number(s): "96"

Test #3:

score: 0
Accepted
time: 1ms
memory: 3552kb

input:

4
2 7 2 5

output:

8

result:

ok 1 number(s): "8"

Test #4:

score: 0
Accepted
time: 1ms
memory: 3856kb

input:

5
2 1 7 9 7

output:

72

result:

ok 1 number(s): "72"

Test #5:

score: 0
Accepted
time: 1ms
memory: 3620kb

input:

6
10 7 1 10 12 9

output:

96

result:

ok 1 number(s): "96"

Test #6:

score: 0
Accepted
time: 1ms
memory: 3576kb

input:

7
4 6 8 2 11 3 3

output:

96

result:

ok 1 number(s): "96"

Test #7:

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

input:

8
6 11 15 10 12 8 12 16

output:

8

result:

ok 1 number(s): "8"

Test #8:

score: 0
Accepted
time: 1ms
memory: 3780kb

input:

9
14 17 5 15 13 10 9 12 15

output:

472

result:

ok 1 number(s): "472"

Test #9:

score: 0
Accepted
time: 1ms
memory: 3844kb

input:

10
137 137 137 137 137 137 137 137 137 137

output:

0

result:

ok 1 number(s): "0"

Test #10:

score: 0
Accepted
time: 1ms
memory: 3552kb

input:

10
11 13 17 19 37 41 53 73 83 97

output:

5040

result:

ok 1 number(s): "5040"

Test #11:

score: 0
Accepted
time: 1ms
memory: 3620kb

input:

11
11 9 8 4 14 13 14 15 6 14 2

output:

1176

result:

ok 1 number(s): "1176"

Test #12:

score: 0
Accepted
time: 1ms
memory: 3624kb

input:

12
33 3 17 13 42 29 14 22 21 40 18 21

output:

1928

result:

ok 1 number(s): "1928"

Test #13:

score: 0
Accepted
time: 1ms
memory: 3624kb

input:

13
82 16 56 44 95 9 90 13 51 22 78 23 13

output:

3416

result:

ok 1 number(s): "3416"

Test #14:

score: 0
Accepted
time: 1ms
memory: 3632kb

input:

16
34 104 171 206 183 66 43 21 113 207 86 191 59 199 30 178

output:

12968

result:

ok 1 number(s): "12968"

Test #15:

score: 0
Accepted
time: 1ms
memory: 3632kb

input:

20
298 157 97 212 17 247 414 68 96 189 173 313 295 258 141 445 440 354 279 242

output:

36624

result:

ok 1 number(s): "36624"

Test #16:

score: 0
Accepted
time: 1ms
memory: 3628kb

input:

21
362 729 128 357 842 23 210 373 73 719 118 128 719 367 265 548 769 125 516 770 579

output:

55312

result:

ok 1 number(s): "55312"

Test #17:

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

input:

25
1985 455 947 729 1667 2180 1089 980 1024 553 220 1256 1894 2323 38 120 2497 72 1533 2138 942 1394 597 2279 1218

output:

58096

result:

ok 1 number(s): "58096"

Test #18:

score: 0
Accepted
time: 1ms
memory: 3632kb

input:

31
4217 959 2652 3977 1768 3661 2034 3780 2787 437 5096 2301 4103 1671 2540 248 3301 1207 2070 1059 1408 4145 3596 192 1699 147 3428 3809 3733 2827 1897

output:

258104

result:

ok 1 number(s): "258104"

Test #19:

score: 0
Accepted
time: 1ms
memory: 3632kb

input:

39
65 5688 2951 1977 3195 1103 12150 6798 11060 2335 8382 5784 3339 12070 5517 8443 9542 3303 9223 6188 7654 9139 11730 5688 11810 2914 3418 10061 667 2244 1520 11218 7920 1268 9527 1091 9023 4921 5846

output:

336864

result:

ok 1 number(s): "336864"

Test #20:

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

input:

44
15443 4254 11654 25177 2795 26791 11734 26400 23117 24055 30485 10274 18513 12346 12545 9964 13352 12711 28089 9593 12491 22012 17507 613 8201 8718 22823 23378 15878 30786 24481 28495 14174 17927 15411 17268 20198 16929 16784 16367 27988 31072 22419 6450

output:

987248

result:

ok 1 number(s): "987248"

Test #21:

score: 0
Accepted
time: 1ms
memory: 3664kb

input:

57
71686 22883 53252 35740 33553 54183 26035 33374 54795 43319 67797 41000 4276 3982 43974 25262 44224 6094 12606 36023 71459 46721 5136 6177 634 3667 66392 51058 13772 27262 68533 51480 38176 49063 46928 14167 1211 16760 51571 13626 58765 50074 51738 61100 18398 22349 34026 912 4959 62612 63392 592...

output:

1602192

result:

ok 1 number(s): "1602192"

Test #22:

score: 0
Accepted
time: 1ms
memory: 3576kb

input:

70
23567 109625 117688 146867 71814 28945 32393 100323 144272 13276 26325 463 58748 42618 132600 139127 119308 129496 76138 96434 162123 99180 72309 14867 109633 138965 40120 78169 154978 63945 31426 105880 138585 18278 72502 33741 132860 22489 158600 6183 105084 74925 155567 156950 65112 150805 158...

output:

4979144

result:

ok 1 number(s): "4979144"

Test #23:

score: 0
Accepted
time: 1ms
memory: 3832kb

input:

86
329145 366934 164775 45100 109193 276132 304542 62090 352615 96127 193196 299118 236035 154212 198564 223084 58223 295683 188636 143903 212269 212838 368122 164228 170909 19372 243628 42334 125990 291394 265521 185648 147971 347827 53150 211683 143702 311430 233315 325668 191297 147121 297955 269...

output:

11086680

result:

ok 1 number(s): "11086680"

Test #24:

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

input:

102
464633 119533 366510 260789 132943 140172 480918 590625 851764 391899 736130 34697 1077 632637 725589 159227 490000 693165 20875 709529 452153 674390 182704 718939 746713 158937 723175 534187 212010 609611 686372 79943 466332 183348 634770 583650 288468 130512 468111 171363 338216 331346 823755 ...

output:

15629672

result:

ok 1 number(s): "15629672"

Test #25:

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

input:

133
1464673 1157637 548813 755219 242519 1454547 1124699 1072698 1427028 1945682 983277 1372058 593438 534282 1862814 2037170 1879436 2027904 1382255 999313 982699 1681199 975333 1538737 983698 1021288 914126 1002718 1034006 90541 1987303 422618 738021 143102 2002985 612657 647678 1018359 1997983 37...

output:

67623656

result:

ok 1 number(s): "67623656"

Test #26:

score: 0
Accepted
time: 3ms
memory: 3656kb

input:

155
4052689 1419238 2552891 3206606 5253719 108516 2512540 4520794 2789827 5194725 2615507 2408899 1546174 943950 580702 907081 1381937 1211703 1074198 2657508 1632170 4438084 4378396 1184101 17750 5055197 2881966 2348594 1325485 106923 2006975 3608610 1358236 4490677 2761737 3623599 2004886 4520979...

output:

136965520

result:

ok 1 number(s): "136965520"

Test #27:

score: 0
Accepted
time: 3ms
memory: 3600kb

input:

170
2530273 6223450 944941 4113808 8987513 8226713 817823 2034786 1609427 5694651 1969329 45036 4370751 1976104 6325141 6659083 10990543 4207667 1920989 10685318 8172659 133291 5893227 7695266 11101295 10189474 1231819 8348682 4714435 9467899 4293670 10085784 1351731 6384408 7999749 2941029 6754105 ...

output:

208861976

result:

ok 1 number(s): "208861976"

Test #28:

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

input:

193
20385538 11476073 4099807 12968877 7561285 22390174 855063 23259285 24451910 20372942 2197123 11778775 18348967 21877162 23115570 7534538 7386963 11937669 16865884 10835991 20737867 8644090 22860363 13726336 6413770 17013707 12642529 20202665 19578056 19061772 11833819 16366279 8673589 17287010 ...

output:

342440320

result:

ok 1 number(s): "342440320"

Test #29:

score: 0
Accepted
time: 7ms
memory: 3568kb

input:

243
12118337 21217197 10969313 29921512 54689758 9169494 24978116 13463356 23727944 10161859 19880712 47537349 1007868 53649250 43219604 23316155 39572905 3413245 48264273 34347816 39489566 24720177 1924079 53389029 47260875 13694280 26331489 19113390 43034963 5359207 58659076 24409768 595528 828776...

output:

815187656

result:

ok 1 number(s): "815187656"

Test #30:

score: 0
Accepted
time: 9ms
memory: 3928kb

input:

272
117042388 4438924 17090285 39930287 98105613 22893591 80958439 18870140 45896618 69458107 25929331 1056513 86429421 93409726 114872764 113290704 81233296 105518347 117846589 50321737 9438264 83110 95516050 114177233 52087051 42489395 35925802 5954482 66550334 75059190 89134454 17327432 89675276 ...

output:

1467468104

result:

ok 1 number(s): "1467468104"

Test #31:

score: 0
Accepted
time: 6ms
memory: 3728kb

input:

304
20823857 48844410 202566702 174997474 62696712 76064317 8349475 53024242 58859225 70895773 148130303 12503894 168485729 285345531 196569230 95973508 174431049 38448620 97182749 97859473 92737009 210189289 136401052 69295571 73100231 210505658 291385820 40377181 146468615 16532766 285952272 28400...

output:

1759504008

result:

ok 1 number(s): "1759504008"

Test #32:

score: 0
Accepted
time: 13ms
memory: 3644kb

input:

346
475822231 448033921 384646419 17312419 557772150 132680282 58850739 318540283 404321697 114514056 521917920 526421699 83969057 617980860 224693817 328266488 608792819 367021462 408250978 104513074 45114589 34566804 140484709 178492190 116093557 623732317 612979540 294145368 628237332 7481362 198...

output:

3338211984

result:

ok 1 number(s): "3338211984"

Test #33:

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

input:

397
564221636 67193389 145664433 781532395 1333114420 487113347 1540287700 1304708305 469360733 1440689849 1575664071 1020935359 688836715 342045594 273369347 1401697462 1209796156 469591435 254384645 248426491 693249890 1484019287 785822356 135219582 532484912 169632965 88535837 1346052082 12507244...

output:

5152680904

result:

ok 1 number(s): "5152680904"

Test #34:

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

input:

432
2096964648 2546240523 1478910750 995704658 621141521 417344704 1277773410 2306615597 1152550120 302445404 293983691 2954368970 2405843139 3276063946 1228330870 229264555 144024022 2677771487 1754184497 1434963331 2096446948 420711913 1788227926 3276727447 1764732462 921088966 585946283 319004563...

output:

7016290304

result:

ok 1 number(s): "7016290304"

Test #35:

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

input:

466
1085890719 6793766460 2947094591 2803363200 3443933620 1183065291 1094388393 6663064931 2500741345 4339858135 4521091168 4925825477 6158652568 6343816384 1098529748 1428863391 7188134065 2478903587 314431967 681459660 4829346341 480423403 1313468408 3211937781 2732243313 4153802143 3611797621 38...

output:

11834874088

result:

ok 1 number(s): "11834874088"

Test #36:

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

input:

512
10952843148 5514305139 12895252901 11966964509 3941183074 900904420 1524268328 12347803632 2458233678 9022429105 2639586294 12473272121 13979008347 4682302383 4820683770 13068355376 6485624876 10526801576 14659708151 4921515100 5754990323 8835042386 3722762238 8735841957 6895736787 14812549538 1...

output:

16631332232

result:

ok 1 number(s): "16631332232"

Test #37:

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

input:

604
5272455921 24995126164 13530228299 11719481869 5080197598 33591190475 29808557288 4411616915 8485255580 27592015891 20354579917 1598250702 23559854048 32612512304 16292654896 7048490980 4138485819 25029833071 22538405787 25712630586 18530814161 30343338560 28049347261 16725210926 8183650115 2101...

output:

28718811216

result:

ok 1 number(s): "28718811216"

Test #38:

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

input:

791
53465518461 783210676 32508277238 61571351641 47106922441 6091850011 6365101031 69942113025 15639347864 32573399625 3434742079 67166665640 29211483547 1264331177 35564333666 31773545646 43818380890 15595759838 68774661859 16014253087 58142118783 24937765992 2157104864 34597619060 1073463104 6151...

output:

85143390672

result:

ok 1 number(s): "85143390672"

Test #39:

score: 0
Accepted
time: 96ms
memory: 4056kb

input:

917
4747152837 17607088026 169091532214 6189255761 115442303837 167573698482 30874226755 17800853374 39730647349 83861652851 144842174077 93855987864 117858599128 58645878298 91479737396 122093606360 44760527984 172360915804 78374241714 115980192336 45628991190 87348354417 62646168487 75925608257 59...

output:

166698632808

result:

ok 1 number(s): "166698632808"

Test #40:

score: 0
Accepted
time: 119ms
memory: 3856kb

input:

1008
383556780263 67667112627 331838640796 329620787779 377623656129 3400563487 203497696252 299257226287 70556829517 86950601378 295809788840 124756098581 203527806472 366937485877 150730271780 381677632116 342586425667 140868128631 205560715217 25170176035 84839436743 22508939649 129243706627 1385...

output:

223616029464

result:

ok 1 number(s): "223616029464"

Test #41:

score: 0
Accepted
time: 479ms
memory: 4076kb

input:

2000
251545530212 712468881108 515999612712 657773767684 46174360066 39260412910 112874308629 324089664568 380661339616 160672480796 76460882680 592187528756 366829031415 624731063704 903147232180 674470975530 183570616243 426126967855 528335363039 57409918754 608640334198 601938381764 463476064580 ...

output:

3292662756280

result:

ok 1 number(s): "3292662756280"

Test #42:

score: 0
Accepted
time: 473ms
memory: 4300kb

input:

2000
15326876356 684498921036 300099774194 645445440525 222777834090 373153835609 678601676366 897049512102 50359666241 907338292510 861335005465 450231821937 955174324434 216417144550 734211091909 239331402932 648627978520 794701517711 413487030904 128821224324 713284687109 431107137801 48183038145...

output:

3357909582224

result:

ok 1 number(s): "3357909582224"

Test #43:

score: 0
Accepted
time: 471ms
memory: 4072kb

input:

2000
236244837642 506637775811 662662623945 249159213124 191621237075 744557035757 820521313230 307821165578 882250284542 278306914741 196930852602 282667970479 759713643298 277379759731 636465457488 285600500616 65152866125 703809897750 415324748165 591886465724 635609252350 345502492576 8587500079...

output:

3412787772864

result:

ok 1 number(s): "3412787772864"

Test #44:

score: 0
Accepted
time: 459ms
memory: 4020kb

input:

2000
968549023872 135230713538 395365083508 160200554671 540364786182 188471959604 905293796444 779974885228 192177170781 596814763367 509391564132 956002798582 328356668463 76918388422 659334690845 294955261871 105656037528 808768398414 884597009359 856808806608 652228906920 840325628944 4331123973...

output:

3824370399320

result:

ok 1 number(s): "3824370399320"

Test #45:

score: 0
Accepted
time: 459ms
memory: 4140kb

input:

2000
278667154285 631942546129 668034991548 71536052567 357004925898 161082510516 470584890305 578956388310 945298385065 922944386493 689451174173 268860860750 849426691394 604568764006 235906738165 253987072049 853079142211 324329218237 876055832605 349669367241 932001874252 995633008355 3560575942...

output:

3439289961128

result:

ok 1 number(s): "3439289961128"

Test #46:

score: 0
Accepted
time: 456ms
memory: 4076kb

input:

2000
626061885466 883556061048 580441155176 314061562436 876752327143 253312241398 976794980803 449356394062 82750869543 286273766463 213739514607 384883734974 64569934754 532732043228 594056092319 462239068182 706298100117 516680326636 742480351544 893810863535 951667113521 222693094559 72553046664...

output:

3441290595152

result:

ok 1 number(s): "3441290595152"

Test #47:

score: 0
Accepted
time: 456ms
memory: 4372kb

input:

2000
284694236366 934441895999 308129369664 985868937086 259215356838 919180153730 971038933548 85049757662 995783882785 722568234612 354522683298 235788600143 974558771351 127080106416 521794852323 229886522982 112794393047 846976332642 218072088038 275207037066 89931784607 289014654413 18492601058...

output:

3568942633632

result:

ok 1 number(s): "3568942633632"

Test #48:

score: 0
Accepted
time: 456ms
memory: 4076kb

input:

2000
590550102993 336612140205 863574385676 904219529484 921171315789 522177886944 387722824900 37401869708 498864794846 127195043302 459035113469 54059159561 787867099498 944011755114 5039899530 780473331241 93234564687 820925254825 711342409969 670503244386 939045559006 634031572725 756910919663 4...

output:

3306685893704

result:

ok 1 number(s): "3306685893704"

Test #49:

score: 0
Accepted
time: 463ms
memory: 4076kb

input:

2000
43004453740 897411620940 628166611605 798647741176 237951671079 704168122775 35252366673 919249128544 88387579558 712926732315 470761208008 964190232052 300381863778 354235741329 467201737051 56176422502 883760871751 786544433479 443660611873 293402575678 886409534775 969554141342 84300644965 7...

output:

3569461105256

result:

ok 1 number(s): "3569461105256"

Test #50:

score: 0
Accepted
time: 461ms
memory: 4072kb

input:

2000
624071138789 760001137314 530274642082 250566755656 837269832569 113454123056 100879049629 419789403492 978707112386 695964583580 841611692747 619465273112 799840036807 773600245423 774224978206 698061505062 415634854151 461247110341 102522251580 856478492455 76988940273 105757245266 4699503063...

output:

3435709965296

result:

ok 1 number(s): "3435709965296"

Test #51:

score: 0
Accepted
time: 198ms
memory: 4020kb

input:

2000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

15952043988000

result:

ok 1 number(s): "15952043988000"

Test #52:

score: 0
Accepted
time: 194ms
memory: 4144kb

input:

2000
1 1 1 2 2 1 2 2 1 2 1 2 2 1 1 1 2 1 1 2 1 2 1 2 1 1 2 1 1 1 1 1 1 2 2 2 1 1 2 1 1 2 1 2 1 2 1 1 1 2 1 1 1 2 1 2 1 2 2 2 2 1 1 1 2 2 2 1 1 2 2 2 1 1 1 1 2 1 2 2 2 1 2 2 1 2 2 2 2 2 1 2 2 2 1 1 2 1 1 1 2 2 2 2 2 2 2 1 2 2 1 2 1 1 1 1 2 1 2 2 1 1 2 1 2 2 1 1 2 2 1 1 2 2 2 1 2 2 2 1 1 1 2 1 1 2 1 1...

output:

7121942047704

result:

ok 1 number(s): "7121942047704"

Test #53:

score: 0
Accepted
time: 200ms
memory: 4076kb

input:

2000
3 3 1 1 2 3 2 1 3 2 1 3 3 1 2 3 2 2 2 2 1 1 3 1 3 3 2 2 1 3 2 1 3 3 2 2 1 1 2 1 3 1 3 3 2 3 3 3 3 1 2 3 2 3 2 3 3 2 1 1 3 3 2 1 1 2 2 1 3 2 1 1 3 3 3 1 2 3 2 1 3 1 2 3 2 3 3 1 3 1 2 2 1 2 2 3 1 3 3 3 2 2 1 2 2 3 1 3 1 3 1 3 1 1 1 3 1 3 2 3 3 3 2 3 1 3 3 1 3 3 3 2 3 1 3 1 2 1 2 1 1 1 2 1 3 3 2 3...

output:

6822688753368

result:

ok 1 number(s): "6822688753368"

Test #54:

score: 0
Accepted
time: 198ms
memory: 4112kb

input:

2000
2 4 2 4 4 4 4 3 1 3 4 3 1 2 2 3 2 4 2 4 2 1 3 2 4 4 2 3 4 2 3 3 2 1 1 2 3 2 1 1 4 3 2 1 1 2 4 3 3 4 1 3 3 2 3 4 1 3 4 1 1 4 1 4 1 3 3 2 1 2 4 3 2 1 4 4 4 2 1 4 4 4 2 3 3 4 2 3 4 3 2 2 2 4 2 1 4 3 4 2 3 2 3 4 3 4 1 1 2 4 2 3 4 3 3 4 2 4 4 4 3 1 3 3 2 4 2 4 1 4 1 4 3 4 1 1 4 4 2 3 4 4 2 2 4 2 4 2...

output:

4822360959000

result:

ok 1 number(s): "4822360959000"

Test #55:

score: 0
Accepted
time: 194ms
memory: 3644kb

input:

2000
1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1...

output:

0

result:

ok 1 number(s): "0"

Test #56:

score: 0
Accepted
time: 462ms
memory: 4020kb

input:

2000
465864827 578578207 2699672683 3385350523 4163970541 4472334371 4549867769 4833277261 5706679103 6373935247 6494518981 7275139297 7603751003 8746890443 9244337209 10244096587 10370858231 11667675883 12469909409 12655589329 12849815309 13010523131 13745038667 13837317079 14252118821 14278062679 ...

output:

15952043988000

result:

ok 1 number(s): "15952043988000"

Test #57:

score: 0
Accepted
time: 195ms
memory: 4140kb

input:

2000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

15952043988000

result:

ok 1 number(s): "15952043988000"