GCD of 1 to n

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

For each given integer n, print the greatest common divisor of all integers from 1 to n.

Options

exec is denied

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

Sample input:_

1
2
3
4
5
6
10
25
100
1000

Sample output:

1
1
1
1
1
1
1
1
1
1

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1leonid90.06362008/11/07 14:26:170B / 4B / 4B
2usa90.00092008/11/07 19:46:320B / 4B / 4B
3uru90.06982008/11/07 23:11:250B / ?B / ?B
4eban110.04982008/11/07 17:14:370B / 5B / 5B
5konn110.06282008/11/07 18:59:010B / ?B / ?B
6khtokage120.06982008/11/14 10:32:360B / 4B / 8B
7@tttttanaka90.01802012/03/31 23:54:570B / 4B / 4B

Perl _

RankUserSizeTimeDateStatistics
1nuko100.03142008/11/07 21:26:130B / 8B / 2B
2yzx100.01742008/11/07 21:26:180B / ?B / ?B
3leonid100.02182008/11/08 00:38:530B / 8B / 2B
4eban150.03102008/11/07 19:04:460B / 7B / 6B

Python _

RankUserSizeTimeDateStatistics
1Defenestrator130.06062008/11/07 15:12:440B / 9B / 4B
2kt3k130.13952008/11/07 15:51:120B / 9B / 4B
3recursive130.00022008/11/07 23:18:290B / ?B / ?B
4hirose130.07472008/11/12 16:39:130B / 9B / 4B
5tttaki130.04202009/01/01 14:20:590B / 9B / 4B

PHP _

RankUserSizeTimeDateStatistics
1leonid191.67482008/11/07 15:47:010B / 10B / 0B
2kt3k190.12982008/11/10 02:47:210B / 10B / 0B
3uru281.73722008/11/07 23:12:529B / ?B / ?B
4varutsu7190.12712008/11/20 11:19:180B / ?B / ?B

Pike _

RankUserSizeTimeDateStatistics
1pooq280.04922014/03/01 20:06:130B / 16B / 11B

Scheme _

RankUserSizeTimeDateStatistics
1murky-satyr210.43752008/11/07 15:30:360B / 15B / 5B

Common LISP _

RankUserSizeTimeDateStatistics
1kozima220.05482008/11/07 20:22:480B / 11B / 9B
2murky-satyr220.07482008/11/08 09:24:010B / 11B / 9B

Arc _

RankUserSizeTimeDateStatistics
1pooq153.48862009/10/05 22:58:390B / 9B / 4B
2youz163.49282009/10/02 14:44:510B / 9B / 5B

Clojure _

RankUserSizeTimeDateStatistics
1pooq220.96282010/02/01 05:52:420B / 14B / 6B
2uochan221.80212011/04/23 15:04:400B / ?B / ?B

LilyPond _

RankUserSizeTimeDateStatistics
1pooq240.76342009/12/16 08:34:390B / 11B / 11B

Io _

RankUserSizeTimeDateStatistics
1leonid180.89982008/11/08 01:09:340B / 16B / 2B
2pooq180.83912008/11/08 02:12:570B / 16B / 2B
3murky-satyr180.80972008/11/08 07:55:500B / 16B / 2B
451b190.89972008/11/07 20:29:230B / 14B / 5B

JavaScript _

RankUserSizeTimeDateStatistics
1murky-satyr220.05072008/11/07 15:29:350B / 12B / 10B
2leonid220.05142008/11/08 01:25:300B / 13B / 9B
3ktt220.02982008/11/16 19:15:490B / 13B / 9B
4yoppy220.00042011/10/10 06:05:070B / ?B / ?B

Lua _

RankUserSizeTimeDateStatistics
1pooq220.03522008/11/08 06:28:430B / 12B / 10B
2AndoDaan220.00022014/08/19 20:51:560B / ?B / ?B

Tcl _

RankUserSizeTimeDateStatistics
1murky-satyr280.27722008/11/07 20:51:540B / 19B / 5B
2pooq250.00262009/11/20 23:19:470B / 18B / 3B

Xtal _

RankUserSizeTimeDateStatistics
1pooq140.26982008/11/08 02:46:040B / 9B / 5B

Kite _

RankUserSizeTimeDateStatistics
1leonid230.07952008/11/07 15:53:430B / 11B / 10B

Icon _

RankUserSizeTimeDateStatistics
1pooq(teebee)380.03562012/04/02 19:28:140B / 29B / 6B
2teebee(pooq)410.01562012/04/02 06:00:520B / 31B / 5B
3pooq420.00022012/04/01 23:19:580B / 32B / 5B

REXX _

RankUserSizeTimeDateStatistics
1pooq150.02092012/04/11 23:54:450B / 11B / 0B

PARI/GP _

RankUserSizeTimeDateStatistics
1teebee(pooq)220.01782012/03/25 08:11:330B / 13B / 8B
2pooq230.02032012/03/26 05:50:270B / 16B / 7B

Cyan _

RankUserSizeTimeDateStatistics
1youz144.48822008/11/08 22:29:110B / 11B / 2B
2pooq144.66142008/11/08 22:40:380B / 11B / 2B
3murky-satyr144.67012008/11/09 04:26:040B / 11B / 3B

Smalltalk _

RankUserSizeTimeDateStatistics
1murky-satyr230.17952008/11/07 15:32:280B / 15B / 6B

Prolog _

RankUserSizeTimeDateStatistics
1leonid260.03532008/11/07 15:12:240B / 11B / 14B
2pooq260.34372008/11/08 02:12:380B / 11B / 14B

Forth _

RankUserSizeTimeDateStatistics
151b220.15992008/11/07 20:13:250B / 11B / 7B

BASIC _

RankUserSizeTimeDateStatistics
1pooq170.16072008/11/08 01:49:570B / 13B / 2B

Perl6 _

RankUserSizeTimeDateStatistics
1pooq121.48192009/05/18 18:37:480B / 7B / 2B
2murky-satyr122.25542010/08/13 04:36:450B / 9B / 1B

Erlang _

RankUserSizeTimeDateStatistics
151b660.47892008/11/07 20:19:410B / 34B / 21B

J _

RankUserSizeTimeDateStatistics
1pooq130.53332008/11/10 04:59:330B / 9B / 3B
2pooq120.08042009/05/16 23:01:410B / 9B / 0B
3medialuna810.02532014/08/19 18:09:390B / ?B / ?B

A+ _

RankUserSizeTimeDateStatistics
1pooq120.14932008/11/08 01:04:451B / 6B / 3B

K _

RankUserSizeTimeDateStatistics
1pooq80.01622012/03/18 14:41:110B / 4B / 4B

Mind _

RankUserSizeTimeDateStatistics
1pooq350.00022008/11/08 02:42:4021B / 6B / 3B

C _

RankUserSizeTimeDateStatistics
151b310.00022008/11/07 20:03:540B / 15B / 16B
2leonid310.00202008/11/08 00:40:420B / 15B / 16B
3hikaru310.00022008/11/08 03:03:450B / ?B / ?B
4mirac310.00022008/11/13 13:50:290B / 17B / 14B
5sky_way320.03972008/11/09 23:51:100B / 16B / 16B
6BOB410.00022008/11/08 18:01:080B / ?B / ?B
7inaniwa310.00012009/12/16 16:28:280B / 15B / 16B
8not310.00012009/12/19 11:27:400B / 15B / 16B
9Debanjan310.00022010/09/18 16:38:480B / ?B / ?B
10test320.00012017/09/19 06:10:270B / ?B / ?B

D _

RankUserSizeTimeDateStatistics
151b420.06192008/11/07 20:11:330B / 26B / 14B

Go _

RankUserSizeTimeDateStatistics
1uru540.00012009/12/31 18:29:240B / 34B / 8B

Rust _

RankUserSizeTimeDateStatistics
1pooq360.01592013/04/29 16:24:160B / 22B / 11B

OCaml _

RankUserSizeTimeDateStatistics
1kozima330.01912008/11/18 11:59:000B / 21B / 3B
2samoht440.07932008/11/18 10:13:470B / ?B / ?B

Haskell _

RankUserSizeTimeDateStatistics
1Defenestrator250.00022008/11/07 15:30:500B / 14B / 11B
2notogawa250.01362008/11/07 20:03:070B / 14B / 11B
3tttaki260.02672008/11/08 09:49:060B / ?B / ?B
4konn300.02942008/11/07 18:56:460B / ?B / ?B

Java _

RankUserSizeTimeDateStatistics
1teebee530.12552010/11/07 08:57:250B / ?B / ?B
2pooq540.12532010/09/17 22:13:090B / 34B / 18B
3uru940.15562009/03/15 03:30:520B / 65B / 25B

Pascal _

RankUserSizeTimeDateStatistics
1uru460.00022008/11/07 23:16:070B / ?B / ?B
2uru380.00022008/11/27 23:52:350B / ?B / ?B

Fortran _

RankUserSizeTimeDateStatistics
1pooq310.07822008/11/08 02:43:050B / 19B / 8B
2*yuko*210.00022009/08/26 11:28:110B / 11B / 10B

C# _

RankUserSizeTimeDateStatistics
1inaniwa820.07082011/04/05 21:52:360B / 57B / 22B

Nemerle _

RankUserSizeTimeDateStatistics
1murky-satyr330.25792008/11/07 15:43:130B / 24B / 9B

COBOL _

RankUserSizeTimeDateStatistics
1xsd610.00012010/01/17 16:52:410B / 44B / 7B
2pooq830.03972009/11/16 18:36:360B / 69B / 9B

Curry _

RankUserSizeTimeDateStatistics
1pooq320.00022009/11/03 20:19:490B / 20B / 3B

LMNtal _

RankUserSizeTimeDateStatistics
1pooq420.72612009/01/28 19:55:470B / 22B / 11B

Maxima _

RankUserSizeTimeDateStatistics
1pooq241.98242012/01/07 22:54:060B / 18B / 3B

gnuplot _

RankUserSizeTimeDateStatistics
1pooq410.05482012/04/11 10:31:420B / 26B / 12B

Octave _

RankUserSizeTimeDateStatistics
1KirarinSnow190.40632011/03/18 10:05:040B / 14B / 5B
2inaniwa190.40732011/03/21 21:14:510B / 14B / 5B
3pooq240.40842011/03/18 07:40:120B / 12B / 12B

REBOL _

RankUserSizeTimeDateStatistics
1kt3k200.08782009/02/12 12:36:370B / 12B / 6B
2pooq230.06962009/02/11 20:29:050B / 17B / 4B
3leonid230.09062009/02/12 02:41:520B / 17B / 4B

Asymptote _

RankUserSizeTimeDateStatistics
1teebee240.15872011/12/17 05:01:230B / 14B / 9B
2pooq271.03982009/03/25 10:57:400B / 16B / 10B

AWK _

RankUserSizeTimeDateStatistics
1eban40.02442008/11/07 16:58:590B / 2B / 2B
2waldner40.02502008/11/07 17:37:060B / 2B / 2B
3ustimaw40.01062015/02/20 23:13:210B / ?B / ?B

sed _

RankUserSizeTimeDateStatistics
1leonid20.02152008/11/07 14:41:510B / 2B / 0B
2eban20.00572008/11/07 17:00:410B / 2B / 0B
3waldner20.01362008/11/07 17:37:210B / 2B / 0B
4kaki20.05022009/01/11 03:48:130B / 2B / 0B
5ustimaw20.01342015/02/22 16:05:180B / ?B / ?B

jq _

RankUserSizeTimeDateStatistics
1pooq10.01082014/11/23 20:04:380B / 1B / 0B
2eban130.01082014/11/27 19:03:540B / 9B / 4B

Bash _

RankUserSizeTimeDateStatistics
1leonid60.01912008/11/07 14:42:060B / 5B / 0B
2waldner60.06212008/11/07 17:38:120B / 5B / 0B
3eban110.03972008/11/07 17:03:120B / 6B / 2B

Bash (builtins) _

RankUserSizeTimeDateStatistics
1tails170.00392017/09/19 09:51:080B / 9B / 6B

Zsh _

RankUserSizeTimeDateStatistics
1Hendrik100.00342017/10/01 03:46:170B / 5B / 4B

wake _

RankUserSizeTimeDateStatistics
1murky-satyr190.00392010/07/26 21:30:470B / 8B / 10B
2eban210.00402010/07/22 00:45:460B / 7B / 12B
3pooq310.00382010/07/20 18:51:360B / 19B / 12B

bc _

RankUserSizeTimeDateStatistics
1Carlos Gutierrez190.00012010/03/16 18:52:330B / 10B / 8B
2pooq210.00012010/02/13 12:42:300B / 12B / 7B

dc _

RankUserSizeTimeDateStatistics
1tails100.04442012/03/18 21:17:150B / 7B / 2B
2pooq110.00012010/04/12 11:39:110B / 11B / 0B

m4 _

RankUserSizeTimeDateStatistics
1leonid190.02252008/11/07 15:47:270B / 10B / 0B
2kt3k190.12972008/11/10 02:48:010B / 10B / 0B

Postscript _

RankUserSizeTimeDateStatistics
151b90.41072008/11/07 20:08:552B / 3B / 3B
2yshl130.42962008/11/07 20:10:060B / 9B / 3B

R _

RankUserSizeTimeDateStatistics
151b191.16952008/11/07 20:37:490B / 9B / 10B

QCL _

RankUserSizeTimeDateStatistics
1pooq270.03892008/11/08 02:41:010B / 18B / 5B

Brainfuck _

RankUserSizeTimeDateStatistics
1nuko150.00292008/11/07 21:39:210B / 0B / 15B
2kaki150.07972008/11/08 00:40:440B / 0B / 15B
3leonid150.00562008/11/08 00:58:470B / 0B / 15B
4kt3k150.05332008/11/10 02:38:020B / 0B / 15B
5hirose150.01912008/11/12 16:47:140B / 0B / 15B
6test150.01062017/09/19 06:09:020B / ?B / ?B

Whitespace _

RankUserSizeTimeDateStatistics
1%20360.02172014/11/24 01:05:040B / 0B / 0B

Befunge _

RankUserSizeTimeDateStatistics
1yzx90.02442008/11/08 21:15:510B / 2B / 7B
2kaki130.02212008/11/08 00:48:490B / 4B / 9B
3nuko90.00712008/11/18 00:48:340B / ?B / ?B
4kaki90.01822009/01/11 03:53:380B / 2B / 7B
5@tttttanaka90.00512012/03/31 23:58:470B / 2B / 7B

><> _

RankUserSizeTimeDateStatistics
1%2090.09382015/11/10 15:57:160B / 7B / 2B

GolfScript _

RankUserSizeTimeDateStatistics
1irori50.39162008/11/07 21:36:020B / 3B / 2B
2leonid50.07952008/11/08 00:56:110B / 3B / 2B
3kt3k50.07882008/11/10 02:41:210B / 3B / 2B

gs2 _

RankUserSizeTimeDateStatistics
1mitchs20.10152015/11/10 10:21:401B / 1B / 0B
2whio20.09612017/02/07 02:56:131B / 1B / 0B

FlogScript _

RankUserSizeTimeDateStatistics
1pooq20.02722010/02/28 13:16:520B / 1B / 1B

Burlesque _

RankUserSizeTimeDateStatistics
1mroman80.00022012/09/18 02:18:240B / 4B / 4B
2pooq130.00022012/09/17 19:52:100B / 7B / 5B

Malbolge _

RankUserSizeTimeDateStatistics
1test11730.01532012/07/01 02:56:490B / ?B / ?B

Unlambda _

RankUserSizeTimeDateStatistics
1irori210.00022008/11/10 02:13:070B / 10B / 11B

Lazy-K _

RankUserSizeTimeDateStatistics
151b1200.01462008/11/09 20:15:320B / 64B / 56B

Universal Lambda _

RankUserSizeTimeDateStatistics
1hinoe90.01132009/03/08 13:28:329B / 0B / 0B

z80 _

RankUserSizeTimeDateStatistics
1kodera90.04392009/05/12 23:09:236B / 1B / 1B
2inaniwa160.00022010/07/18 15:16:519B / 2B / 2B

DOS _

RankUserSizeTimeDateStatistics
151b161.01892008/11/08 20:09:4911B / 1B / 2B
2*yuko*103.70412011/12/21 06:31:226B / 2B / 2B

Vim _

RankUserSizeTimeDateStatistics
1leonid80.05942008/11/07 14:59:570B / 8B / 0B
2eban80.09532008/11/07 17:13:540B / 8B / 0B
3udioica70.01392017/05/21 21:04:272B / 5B / 0B

goruby _

RankUserSizeTimeDateStatistics
1leonid80.11142008/11/07 14:27:370B / 4B / 3B
2murky-satyr80.14962008/11/07 15:28:200B / 4B / 3B
3eban80.15772008/11/07 19:20:400B / 4B / 3B
4kaki80.27492009/01/11 04:03:340B / 3B / 5B
5@tttttanaka80.04012012/03/31 23:56:080B / 4B / 3B

Groovy _

RankUserSizeTimeDateStatistics
1murky-satyr133.66122008/11/07 20:55:560B / 9B / 4B

Scala _

RankUserSizeTimeDateStatistics
1pooq153.12522011/02/09 12:10:210B / 9B / 6B

Logo _

RankUserSizeTimeDateStatistics
1KirarinSnow180.00042011/03/18 11:36:400B / 14B / 2B

Language Ranking_

RankLangUserSizeScore
1jqpooq110000
2sedleonid25000
3FlogScriptpooq25000
4gs2mitchs25000
5AWKeban42500
6GolfScriptirori52000
7Bashleonid61666
8Vimudioica71428
9gorubyleonid81250
10Kpooq81250
11Burlesquemroman81250
12Rubyleonid91111
13Postscript51b91111
14Befungeyzx91111
15Universal Lambdahinoe91111
16z80kodera91111
17><>%2091111
18Perlnuko101000
19DOS*yuko*101000
20dctails101000
21ZshHendrik101000
22A+pooq12833
23Jpooq12833
24Perl6pooq12833
25PythonDefenestrator13769
26Groovymurky-satyr13769
27Xtalpooq14714
28Cyanyouz14714
29Brainfucknuko15666
30Arcpooq15666
31Scalapooq15666
32REXXpooq15666
33BASICpooq17588
34Bash (builtins)tails17588
35Ioleonid18555
36LogoKirarinSnow18555
37PHPleonid19526
38m4leonid19526
39R51b19526
40bcCarlos Gutierrez19526
41wakemurky-satyr19526
42OctaveKirarinSnow19526
43REBOLkt3k20500
44Schememurky-satyr21476
45Unlambdairori21476
46Fortran*yuko*21476
47JavaScriptmurky-satyr22454
48Forth51b22454
49Common LISPkozima22454
50Luapooq22454
51Clojurepooq22454
52PARI/GPteebee(pooq)22454
53Smalltalkmurky-satyr23434
54Kiteleonid23434
55LilyPondpooq24416
56Asymptoteteebee24416
57Maximapooq24416
58HaskellDefenestrator25400
59Tclpooq25400
60Prologleonid26384
61QCLpooq27370
62Pikepooq28357
63C51b31322
64Currypooq32312
65Nemerlemurky-satyr33303
66OCamlkozima33303
67Mindpooq35285
68Rustpooq36277
69Whitespace%2036277
70Pascaluru38263
71Iconpooq(teebee)38263
72gnuplotpooq41243
73D51b42238
74LMNtalpooq42238
75Javateebee53188
76Gouru54185
77COBOLxsd61163
78Erlang51b66151
79C#inaniwa82121
80Lazy-K51b12083
81Malbolgetest117357

return to the top page