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

Python3 _

RankUserSizeTimeDateStatistics
1c_r_5150.04142019/05/01 05:19:540B / ?B / ?B
2z423x5c6220.04702020/04/20 20:34:430B / ?B / ?B

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

Crystal _

RankUserSizeTimeDateStatistics
1Sisyphus110.01562021/03/24 13:34:510B / 6B / 3B
2yuruhiya120.01622021/03/24 11:52:490B / 6B / 5B
3pooq130.00012018/01/08 09:02:320B / ?B / ?B

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
1alephalpha210.01772022/01/16 11:48:150B / 16B / 5B
2teebee(pooq)220.01782012/03/25 08:11:330B / 13B / 8B
3pooq230.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
1yuruhiya110.83712021/03/24 11:59:240B / 8B / 2B
2pooq121.48192009/05/18 18:37:480B / 7B / 2B
3murky-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

Jelly _

RankUserSizeTimeDateStatistics
1Erik the Outgolfer40.15332021/04/04 09:22:121B / 3B / 0B
2pooq50.14502021/03/24 11:07:320B / ?B / ?B

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

Chapel _

RankUserSizeTimeDateStatistics
1pooq260.01272019/08/11 13:28:100B / ?B / ?B

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

Euphoria _

RankUserSizeTimeDateStatistics
1pooq240.01452021/05/22 06:54:170B / ?B / ?B

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
4Fleur40.01392021/11/05 15:55:060B / 2B / 2B

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
4McBusLuck100.00832020/03/25 08:11:240B / 8B / 1B

Bash (builtins) _

RankUserSizeTimeDateStatistics
1tails170.00392017/09/19 09:51:080B / 9B / 6B
2McBusLuck200.01512020/03/19 19:44:580B / 10B / 7B

Zsh _

RankUserSizeTimeDateStatistics
1McBusLuck60.00692020/03/25 08:13:220B / 5B / 0B
2Hendrik100.00342017/10/01 03:46:170B / 5B / 4B

Fish _

RankUserSizeTimeDateStatistics
1McBusLuck60.01742020/03/25 08:13:300B / 5B / 0B

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
1tails70.01462018/10/10 15:44:360B / 7B / 0B
2pooq110.00012010/04/12 11:39:110B / 11B / 0B

xgawk _

RankUserSizeTimeDateStatistics
1McBusLuck40.02932020/03/25 08:14:150B / 2B / 2B

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
2pooq180.26442021/05/23 08:38:350B / ?B / ?B

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

Labyrinth _

RankUserSizeTimeDateStatistics
1pooq310.05952021/03/30 17:29:030B / ?B / ?B

><> _

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

Nibbles _

RankUserSizeTimeDateStatistics
1tails10.01692022/01/27 22:34:151B / 0B / 0B

FlogScript _

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

Burlesque _

RankUserSizeTimeDateStatistics
1Hendrik60.01112018/01/26 23:57:180B / 3B / 3B
2mroman80.00022012/09/18 02:18:240B / 4B / 4B
3pooq130.00022012/09/17 19:52:100B / 7B / 5B

Malbolge _

RankUserSizeTimeDateStatistics
1Dingledooper1310.00012019/10/04 06:53:370B / ?B / ?B
2test11730.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
2McBusLuck90.02082020/03/20 05:30:033B / 3B / 2B
3inaniwa160.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
2Nibblestails110000
3sedleonid25000
4FlogScriptpooq25000
5gs2mitchs25000
6AWKeban42500
7xgawkMcBusLuck42500
8JellyErik the Outgolfer42500
9GolfScriptirori52000
10Bashleonid61666
11BurlesqueHendrik61666
12ZshMcBusLuck61666
13FishMcBusLuck61666
14Vimudioica71428
15dctails71428
16gorubyleonid81250
17Kpooq81250
18Rubyleonid91111
19Postscript51b91111
20Befungeyzx91111
21Universal Lambdahinoe91111
22z80kodera91111
23><>%2091111
24Perlnuko101000
25DOS*yuko*101000
26Perl6yuruhiya11909
27CrystalSisyphus11909
28A+pooq12833
29Jpooq12833
30PythonDefenestrator13769
31Groovymurky-satyr13769
32Xtalpooq14714
33Cyanyouz14714
34Brainfucknuko15666
35Arcpooq15666
36Scalapooq15666
37REXXpooq15666
38Python3c_r_515666
39BASICpooq17588
40Bash (builtins)tails17588
41Ioleonid18555
42LogoKirarinSnow18555
43Rpooq18555
44PHPleonid19526
45m4leonid19526
46bcCarlos Gutierrez19526
47wakemurky-satyr19526
48OctaveKirarinSnow19526
49REBOLkt3k20500
50Schememurky-satyr21476
51Unlambdairori21476
52Fortran*yuko*21476
53PARI/GPalephalpha21476
54JavaScriptmurky-satyr22454
55Forth51b22454
56Common LISPkozima22454
57Luapooq22454
58Clojurepooq22454
59Smalltalkmurky-satyr23434
60Kiteleonid23434
61LilyPondpooq24416
62Asymptoteteebee24416
63Maximapooq24416
64Euphoriapooq24416
65HaskellDefenestrator25400
66Tclpooq25400
67Prologleonid26384
68Chapelpooq26384
69QCLpooq27370
70Pikepooq28357
71C51b31322
72Labyrinthpooq31322
73Currypooq32312
74Nemerlemurky-satyr33303
75OCamlkozima33303
76Mindpooq35285
77Rustpooq36277
78Whitespace%2036277
79Pascaluru38263
80Iconpooq(teebee)38263
81gnuplotpooq41243
82D51b42238
83LMNtalpooq42238
84Javateebee53188
85Gouru54185
86COBOLxsd61163
87Erlang51b66151
88C#inaniwa82121
89Lazy-K51b12083
90MalbolgeDingledooper13176

return to the top page