GCD Again

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

Input :
T
N1
a1 a2 .... aN1
N2
a1 a2 .... aN2
..
..
NT
a1 a2 .... aNT

Output:
gcd(a1,a2,...,aN1)
gcd(a1,a2,...,aN2)
..
..
gcd(a1,a2,...,aNT)

Options

now post-mortem time, all source codes will be revealed

Sample input:_

5
1
10
5
2 4 6 8 10
6
1 2 4 5 6 7
10
10 20 30 40 50 60 70 80 90 100
8
1240 1241132 52534512 120 312310 4140 13110 14130

Sample output:

10
2
1
10
2

Sample input:_

50
4
887 778 916 794
6
387 493 650 422 363 28
1
60
4
927 541 427 173
7
212 369 568 430 783 531 863
4
68 136 930 803
3
59 70 168
4
457 12 43 230
4
422 920 785 538
9
325 316 371 414 527 92 981 957 874
3
171 997 282
6
926 85 328 337 506 847
10
314 858 125 896 583 546 815 368 435 365
4
751 88 809 277
9
789 585 404 652 755 400 933 61 677
9
740 13 227 587 95 540 796 571 435
9
468 602 98 903 318 493 653 757 302
1
287
2
866 690
5
620 441 730 32 118
8
772 482 676 710 928 568 857 498
4
587 966 307 684
10
625 529 872 733 830 504 20 271 369 709
6
341 150 797 724 619 246
7
452 922 556 380 489 765 229
2
351 194
1
35
5
125 915 988 857 744
2
228 366
10
937 433 552 438 229 276 408 475 122 859
6
30 238 236 794 819 429
4
12 929 530 777
5
444 764 614 539 607
1
905
9
129 689 370 918 918 997 325 744 471
4
491 500 773 726
5
591 506 140 955 787
10
83 543 465 198 508 356 805 349 612 623
9
300 344 747 569 341 423 312 811 606
2
662 731
9
306 321 737 445 627 523 466 709 417
3
259 925 638
3
625 601 37
3
900 380 551
9
72 974 132 882 931 934 895 661 164
10
982 900 997 960 774 814 669 191 96 927
7
85 341 91 685 377 543 937
8
446 757 180 419 888 413 349 173
10
10 337 211 343 588 207 302 714 373 322
6
820 600 722 905 940 812

Sample output:

1
1
60
1
1
1
1
1
1
1
1
1
1
1
1
1
1
287
2
1
1
1
1
1
1
1
35
1
6
1
1
1
1
905
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1leonid420.74322012/07/03 03:11:030B / 26B / 12B
2clock440.05532012/07/02 15:30:130B / 25B / 15B

Perl _

RankUserSizeTimeDateStatistics
1teebee441.16822012/07/01 05:49:280B / 13B / 31B
2teebee(noexec)550.34432012/07/06 04:22:430B / 34B / 18B
3test1550.08332012/07/06 22:40:060B / ?B / ?B
4nfouille1230.03032012/07/02 22:13:461B / ?B / ?B
5BioFALSE940.03492012/12/12 10:05:330B / 34B / 57B

Python _

RankUserSizeTimeDateStatistics
1leonid800.29572012/07/03 09:46:120B / 46B / 21B
2hallvabo801.33662012/07/04 00:23:550B / 46B / 21B
3twobit910.03712012/07/03 05:59:590B / 53B / 22B

Scheme _

RankUserSizeTimeDateStatistics
1kaki630.10532012/07/04 14:50:300B / 41B / 21B
2youz640.39082012/07/03 22:57:340B / 42B / 19B

Common LISP _

RankUserSizeTimeDateStatistics
1youz720.34112012/07/03 22:57:290B / 42B / 25B
2pgf2790.05642013/04/09 15:28:080B / 57B / 18B

Arc _

RankUserSizeTimeDateStatistics
1youz862.37492012/07/03 22:57:180B / 38B / 39B

JavaScript _

RankUserSizeTimeDateStatistics
1nn910.06352012/07/01 10:37:360B / 46B / 44B

Lua _

RankUserSizeTimeDateStatistics
1twobit920.03082012/07/03 23:56:320B / 58B / 23B

J _

RankUserSizeTimeDateStatistics
1I., S.320.06802012/07/01 05:26:340B / 13B / 18B

K _

RankUserSizeTimeDateStatistics
1twobit370.04822012/07/05 05:49:400B / 9B / 27B
2teebee370.04272012/07/06 04:09:470B / 9B / 27B

C _

RankUserSizeTimeDateStatistics
1nu880.02132012/07/04 22:36:480B / 42B / 46B
2twobit1080.02442012/07/03 07:23:560B / 55B / 53B
3axuerizal1100.03302012/07/02 18:49:410B / ?B / ?B
4kou1170.02942012/07/03 09:37:080B / 59B / 58B

Haskell _

RankUserSizeTimeDateStatistics
1henkma600.04242012/07/03 21:20:090B / 41B / 17B
2cojna600.02632012/07/06 16:27:580B / 41B / 17B
3I., S.630.02652012/07/06 22:05:240B / 44B / 15B

Maxima _

RankUserSizeTimeDateStatistics
1pooq720.17302012/07/03 01:13:160B / 37B / 35B

AWK _

RankUserSizeTimeDateStatistics
1yamaya500.02532012/07/04 17:16:140B / 24B / 26B
2axuerizal550.02962012/07/02 19:19:050B / ?B / ?B

sed _

RankUserSizeTimeDateStatistics
1tails690.02382012/07/08 00:45:250B / 45B / 14B

dc _

RankUserSizeTimeDateStatistics
1tails440.06202012/07/08 01:20:170B / 29B / 15B

GolfScript _

RankUserSizeTimeDateStatistics
1leonid250.11332012/07/03 10:26:050B / 6B / 19B
2twobit250.09492012/07/06 05:55:290B / 6B / 19B

Burlesque _

RankUserSizeTimeDateStatistics
1Hendrik190.03562014/05/18 03:01:450B / 9B / 10B

Groovy _

RankUserSizeTimeDateStatistics
1nn893.18822012/07/01 11:30:130B / 56B / 33B

Language Ranking_

RankLangUserSizeScore
1BurlesqueHendrik1910000
2GolfScriptleonid257600
3JI., S.325937
4Ktwobit375135
5Rubyleonid424523
6Perlteebee444318
7dctails444318
8AWKyamaya503800
9Haskellhenkma603166
10Schemekaki633015
11sedtails692753
12Maximapooq722638
13Common LISPyouz722638
14Pythonleonid802375
15Arcyouz862209
16Cnu882159
17Groovynn892134
18JavaScriptnn912087
19Luatwobit922065

return to the top page