Decomposition

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

Decompose a number N into smaller (integer) numbers n1, n2, ..., nk such that,
N = n1 + n2 + ... + nk
n1 > n2 > ... > nk > 0

Each input line gives a number N. Output the longest length (k above) of the decomposition of N.

-- nn

Options

exec is denied

no deadline, the server will not save your submission

Sample input:_

992
415
225
881
269
181
291
44
175
761
375
795
559
91
594
478
23
628
650
595
990
51
128
226
56
518
393
218
290
662
28
114
332
82
712
264
846
440
313
519

Sample output:

44
28
20
41
22
18
23
8
18
38
26
39
32
13
33
30
6
34
35
34
44
9
15
20
10
31
27
20
23
35
7
14
25
12
37
22
40
29
24
31

Sample input:_

211
77
423
163
919
885
175
990
188
628
539
62
386
810
768
730
529
106
666
128
18
43
68
81
108
150
168
229
289
326
362
397
453
509
543
577
589
634
668
805

Sample output:

20
11
28
17
42
41
18
44
18
34
32
10
27
39
38
37
32
14
36
15
5
8
11
12
14
16
17
20
23
25
26
27
29
31
32
33
33
35
36
39

Sample input:_

152
532
418
295
692
227
163
281
230
259
757
587
319
454
219
526
243
824
92
364
398
609
705
742
405
492
441
685
599
181
632
341
202
813
231
503
101
110
132
838

Sample output:

16
32
28
23
36
20
17
23
20
22
38
33
24
29
20
31
21
40
13
26
27
34
37
38
27
30
29
36
34
18
35
25
19
39
21
31
13
14
15
40

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1leonid320.04902011/05/02 23:30:210B / 20B / 11B
2clock340.07662012/05/05 16:18:080B / 20B / 13B
3jpl410.04552014/06/23 23:28:290B / ?B / ?B
4Histocrat430.04552014/01/06 23:56:460B / 24B / 12B
5GooGoo+.440.01012011/06/17 22:47:380B / ?B / ?B

Perl _

RankUserSizeTimeDateStatistics
1tails280.02602011/05/03 15:36:370B / 16B / 12B
2teebee280.04302011/06/09 06:46:290B / 16B / 12B
3clock280.03412012/10/14 04:22:570B / 16B / 12B
4llhuii280.03212017/10/03 14:18:520B / 16B / 12B
5tybalt89290.02802011/05/03 03:38:360B / ?B / ?B
6ninjalj300.03212011/05/03 21:12:120B / 18B / 11B
7risou450.04232011/05/27 18:37:031B / 16B / 25B

Python _

RankUserSizeTimeDateStatistics
1kaki380.08552011/05/03 20:30:000B / 23B / 13B
2Sven380.08662011/05/21 20:53:430B / 23B / 13B
3teebee380.07832011/06/09 15:49:550B / 23B / 13B
4twobit380.10112012/03/01 10:09:320B / 23B / 13B
5leonid380.08742012/03/01 11:48:410B / 23B / 13B
6clock380.12472012/05/05 16:17:150B / 23B / 13B
7llhuii380.09732015/07/13 06:25:500B / 23B / 13B
8mitchs380.09272015/09/25 13:21:090B / 23B / 13B
9hallvabo390.08362011/05/03 02:50:540B / 23B / 14B
10xulapp390.08212011/05/04 04:40:400B / 23B / 15B
11Hendrik390.07382011/12/01 23:16:270B / 23B / 14B
12rolf400.09632013/09/30 00:40:590B / 24B / 14B

Python3 _

RankUserSizeTimeDateStatistics
1llhuii440.20602015/07/13 06:26:350B / 26B / 17B
2mitchs440.18832015/09/25 13:48:010B / 26B / 17B
3teebee440.21702016/10/09 23:54:520B / 26B / 17B

PHP _

RankUserSizeTimeDateStatistics
1teebee460.28982012/01/05 22:42:231B / 25B / 20B
2clock460.24452012/05/05 16:20:111B / 25B / 19B
3primo470.08482012/01/12 22:01:101B / 25B / 20B

Pike _

RankUserSizeTimeDateStatistics
1teebee740.24752014/02/28 10:51:500B / 40B / 33B

Scheme _

RankUserSizeTimeDateStatistics
1kaki480.19542011/05/03 20:23:180B / 29B / 19B
2clock480.12322012/10/16 14:00:110B / 29B / 19B
3teebee480.11682012/10/20 17:37:270B / 29B / 19B
4youz510.46102011/05/03 03:56:050B / 30B / 21B
5cddddr640.11892011/05/05 16:33:150B / 27B / 28B

Common LISP _

RankUserSizeTimeDateStatistics
1kaki500.45682011/05/04 02:02:230B / 31B / 19B
2teebee500.10042012/10/21 03:07:030B / 28B / 20B
3clock500.08692012/10/21 03:46:360B / 28B / 20B
4kozima520.51922011/05/16 08:49:570B / 28B / 22B
5youz530.83922011/05/03 03:55:550B / 29B / 22B

Arc _

RankUserSizeTimeDateStatistics
1clock352.67492012/10/16 14:11:000B / 22B / 13B
2teebee352.74952012/10/18 06:56:520B / 22B / 13B
3youz416.45202011/05/03 04:03:400B / 24B / 17B
4murky-satyr416.52922011/06/16 01:43:480B / 24B / 17B

Clojure _

RankUserSizeTimeDateStatistics
1clock472.39862012/10/16 14:13:460B / 28B / 18B
2teebee472.68082012/10/20 22:24:110B / 28B / 18B
3murky-satyr505.37062011/06/16 03:34:250B / 29B / 20B

Io _

RankUserSizeTimeDateStatistics
1teebee660.28872013/07/10 06:29:370B / 48B / 16B
2clock660.21622013/07/13 21:42:550B / 48B / 16B
3pooq870.51972011/05/06 06:37:200B / 62B / 21B

JavaScript _

RankUserSizeTimeDateStatistics
1xulapp460.03782011/05/04 05:49:480B / 27B / 19B
2kaki460.02762011/05/04 06:11:210B / 30B / 16B
3nn460.07852011/05/05 13:07:300B / 26B / 20B
4teebee460.03602011/06/09 16:04:350B / 30B / 16B
5murky-satyr460.02032011/07/13 14:00:130B / 20B / 26B
6clock460.12702012/05/05 16:16:430B / 30B / 16B
7Hendrik460.09952012/06/07 23:39:380B / 31B / 15B
8madshall460.04852013/07/31 03:34:510B / ?B / ?B
9FizzyTea460.05122015/12/22 19:43:170B / 27B / 19B
10Agano500.04882011/05/19 23:58:570B / 28B / 22B

Lua _

RankUserSizeTimeDateStatistics
1teebee480.03332011/06/09 16:24:400B / 29B / 17B
2twobit480.05812012/03/01 10:10:510B / 29B / 17B
3clock480.05242012/06/11 00:10:360B / 29B / 17B
4Hendrik490.11742012/01/16 07:22:400B / 29B / 19B

Tcl _

RankUserSizeTimeDateStatistics
1clock510.06552012/10/16 08:30:410B / 30B / 16B
2teebee510.06492012/10/16 09:19:170B / 30B / 16B

Xtal _

RankUserSizeTimeDateStatistics
1teebee630.07022011/12/31 00:09:000B / 37B / 24B
2clock630.06972012/10/07 09:41:230B / 37B / 24B
3pooq710.08762011/05/06 15:56:530B / 37B / 32B

Kite _

RankUserSizeTimeDateStatistics
1teebee850.04792013/03/24 20:48:200B / 57B / 28B
2clock850.04412013/03/24 20:59:040B / 57B / 28B

SNOBOL _

RankUserSizeTimeDateStatistics
1clock550.04392012/07/20 15:28:330B / 30B / 15B

Icon _

RankUserSizeTimeDateStatistics
1teebee580.02552012/04/06 18:16:580B / 38B / 17B
2clock580.03372012/05/05 16:23:490B / 38B / 16B

REXX _

RankUserSizeTimeDateStatistics
1clock480.04182012/11/14 12:16:000B / 30B / 8B
2teebee480.07392012/11/15 03:59:350B / 30B / 8B

PARI/GP _

RankUserSizeTimeDateStatistics
1teebee350.06232013/01/02 09:52:130B / 20B / 15B
2clock350.08892013/01/02 20:07:080B / 20B / 15B
3mitchs350.05362015/09/19 15:36:300B / 20B / 15B

Cyan _

RankUserSizeTimeDateStatistics
1teebee499.84262013/03/03 20:30:450B / 27B / 21B
2clock4910.01602013/03/03 20:58:520B / 27B / 21B

Smalltalk _

RankUserSizeTimeDateStatistics
1clock540.10302013/01/04 18:10:250B / 38B / 14B
2teebee540.11912013/01/04 19:24:090B / 38B / 14B

Prolog _

RankUserSizeTimeDateStatistics
1teebee470.15582012/03/06 10:27:140B / 26B / 20B
2clock470.11722012/10/07 09:45:250B / 24B / 22B

BASIC _

RankUserSizeTimeDateStatistics
1clock370.01822012/10/07 09:47:470B / 21B / 14B
2*yuko*370.02902012/10/07 11:29:010B / 21B / 15B
3teebee370.02402012/11/14 09:58:270B / 21B / 15B

Perl6 _

RankUserSizeTimeDateStatistics
1teebee296.14712012/12/31 06:34:000B / 15B / 12B
2murky-satyr319.64912011/06/16 01:30:590B / 19B / 9B

Erlang _

RankUserSizeTimeDateStatistics
1teebee1200.32632016/07/13 02:04:500B / 65B / 51B

J _

RankUserSizeTimeDateStatistics
1I., S.250.12132011/05/03 19:48:140B / 10B / 15B
2Hendrik280.08872012/06/23 17:43:590B / 9B / 19B
3medialuna820.09132014/08/22 20:38:150B / ?B / ?B

A+ _

RankUserSizeTimeDateStatistics
1teebee460.10492011/05/09 05:59:3712B / 21B / 13B
2twobit460.70842012/03/01 10:12:1213B / 20B / 13B

K _

RankUserSizeTimeDateStatistics
1teebee170.01432012/07/03 13:57:580B / 6B / 11B

C _

RankUserSizeTimeDateStatistics
1leonid580.04182012/03/01 11:51:020B / ?B / ?B
2ush580.08912012/03/17 09:39:080B / 32B / 26B
3teebee580.03282012/10/16 07:08:320B / 32B / 26B
4clock580.03582012/10/16 07:15:170B / 32B / 26B
5nu580.03192013/06/20 13:18:190B / 31B / 27B
6llhuii580.03282015/07/13 06:28:190B / 32B / 26B
7tails580.03192016/10/14 09:49:150B / 32B / 26B
8eha590.04662011/05/15 19:50:110B / 34B / 25B
9nn590.03722011/05/15 20:07:020B / 32B / 27B
10inaniwa590.03782011/05/20 09:11:160B / 32B / 27B
11hinoe590.03632011/05/20 23:21:100B / 32B / 27B
12koi590.03702011/05/28 21:11:230B / 32B / 27B
13Hendrik590.04082012/06/24 00:44:360B / 34B / 25B
14ebi680.03542011/05/22 10:31:540B / 37B / 31B
15Agano690.03672011/05/19 21:17:260B / 34B / 35B
16bk1e700.03352011/05/15 16:30:330B / 34B / 36B
17not750.00252011/05/14 00:32:540B / 36B / 39B

Go _

RankUserSizeTimeDateStatistics
1teebee1180.03192018/02/04 23:14:430B / 67B / 47B
2clock1580.03932012/09/09 14:12:040B / 93B / 60B

OCaml _

RankUserSizeTimeDateStatistics
1m.ukai670.13542011/05/10 11:50:460B / 42B / 22B
2kaki670.10382012/04/06 02:44:290B / 43B / 21B

Haskell _

RankUserSizeTimeDateStatistics
1notogawa470.04482011/11/28 21:26:230B / 33B / 13B
2rst76470.05382011/11/29 17:47:470B / 33B / 13B
3henkma470.05702011/12/01 22:34:400B / 33B / 13B
4kaki480.04452011/11/29 04:42:410B / 34B / 13B
5Icewing560.04122011/06/12 01:07:200B / 35B / 19B

ObjC _

RankUserSizeTimeDateStatistics
1llhuii580.03192015/07/13 06:28:270B / 32B / 26B

Java _

RankUserSizeTimeDateStatistics
1teebee1290.56502011/06/12 09:59:170B / 86B / 38B
2clock1290.28972012/10/25 19:20:280B / 86B / 38B

Pascal _

RankUserSizeTimeDateStatistics
1teebee720.03342011/06/12 09:26:230B / 52B / 16B
2*yuko*720.04122011/06/20 22:47:560B / 52B / 16B
3clock720.02792012/10/16 14:25:320B / 52B / 16B

Fortran _

RankUserSizeTimeDateStatistics
1*yuko*470.04062011/11/10 00:50:410B / 26B / 20B
2teebee470.04132011/12/03 07:22:320B / 29B / 17B
3clock470.03442012/10/16 14:26:410B / 26B / 20B

C# _

RankUserSizeTimeDateStatistics
1Hendrik1210.24362012/10/05 22:15:300B / 83B / 34B
2teebee1210.20432012/10/28 09:23:500B / 83B / 34B
3clock1210.19232012/10/28 11:22:230B / 83B / 34B

Nemerle _

RankUserSizeTimeDateStatistics
1teebee920.17132014/02/24 07:57:010B / 59B / 31B
2clock930.17592012/08/23 09:56:550B / 59B / 32B

COBOL _

RankUserSizeTimeDateStatistics
1*yuko*1930.05492011/06/09 23:14:520B / 140B / 27B

Chapel _

RankUserSizeTimeDateStatistics
1clock460.05172013/10/12 20:44:150B / 27B / 18B

Maxima _

RankUserSizeTimeDateStatistics
1clock460.24712012/10/29 08:23:340B / 28B / 15B
2teebee460.31112012/10/29 09:35:100B / 28B / 15B
3pooq760.47772011/05/06 10:17:550B / 41B / 32B

Octave _

RankUserSizeTimeDateStatistics
1teebee370.57692012/10/16 08:33:010B / 19B / 18B
2clock370.73332012/10/16 08:38:290B / 19B / 18B
3mitchs370.60262015/09/25 13:24:470B / 19B / 18B
4inaniwa391.32282011/06/15 08:15:380B / 21B / 18B

REBOL _

RankUserSizeTimeDateStatistics
1clock520.09792012/07/21 06:11:220B / 32B / 12B
2teebee520.12602012/07/21 06:25:010B / 32B / 12B

Asymptote _

RankUserSizeTimeDateStatistics
1teebee420.51892011/12/15 09:28:580B / 27B / 14B
2clock420.28582012/10/07 10:13:100B / 27B / 14B

Euphoria _

RankUserSizeTimeDateStatistics
1teebee990.03382014/01/26 22:46:290B / 73B / 20B
2clock990.03512014/01/26 23:12:170B / 73B / 20B

AWK _

RankUserSizeTimeDateStatistics
1ninjalj210.00312011/05/03 21:17:290B / 9B / 12B
2teebee210.04212011/06/09 06:47:520B / 9B / 12B
3twobit210.05022012/03/01 10:12:580B / 9B / 12B
4clock210.03832012/10/07 10:14:080B / 9B / 12B
5nn210.03182012/11/10 16:36:370B / 9B / 12B
6llhuii210.03182014/03/20 15:19:000B / 9B / 12B
7mitchs210.03252015/09/25 13:53:510B / 9B / 12B
8hemflit240.00352011/05/05 02:53:370B / ?B / ?B

jq _

RankUserSizeTimeDateStatistics
1teebee250.03272014/11/24 00:35:180B / 20B / 5B
2teebee(-s)340.03252014/12/16 01:13:290B / 17B / 16B

Bash _

RankUserSizeTimeDateStatistics
1narb150.05562011/05/03 21:28:550B / ?B / ?B

Bash (builtins) _

RankUserSizeTimeDateStatistics
1tails410.17952016/10/12 15:57:290B / 18B / 19B
2llhuii410.17442017/10/06 22:07:120B / 18B / 19B
3teebee460.20832016/02/11 08:06:250B / 17B / 25B

Zsh _

RankUserSizeTimeDateStatistics
1narb150.42732011/05/04 20:04:490B / ?B / ?B

Fish _

RankUserSizeTimeDateStatistics
1narb150.42122011/05/04 20:04:570B / ?B / ?B

bc _

RankUserSizeTimeDateStatistics
1teebee450.04422013/03/03 21:11:020B / 21B / 23B
2clock450.05362013/03/03 21:18:350B / 20B / 24B

dc _

RankUserSizeTimeDateStatistics
1narb170.00862011/05/04 20:07:470B / ?B / ?B
2tails210.01822011/05/05 02:39:270B / 13B / 8B

xgawk _

RankUserSizeTimeDateStatistics
1ninjalj210.01612011/05/03 21:17:390B / 9B / 12B
2teebee210.13712011/06/09 06:48:550B / 9B / 12B
3twobit210.12402012/03/01 10:13:050B / 9B / 12B
4clock210.04312012/10/07 10:14:340B / 9B / 12B
5llhuii210.03222014/03/15 17:49:190B / 9B / 12B
6mitchs210.03902015/09/25 13:53:590B / 9B / 12B

R _

RankUserSizeTimeDateStatistics
1clock410.41262012/10/14 13:51:450B / 21B / 20B
2teebee410.41112012/10/14 16:31:080B / 21B / 20B
3pooq410.48402012/10/15 19:39:140B / 21B / 20B

QCL _

RankUserSizeTimeDateStatistics
1teebee570.04742016/10/09 23:59:060B / 36B / 15B
2clock610.06892012/08/25 05:11:050B / 41B / 14B

Brainfuck _

RankUserSizeTimeDateStatistics
1mitchs1640.09682016/07/13 02:35:320B / 0B / 164B

Whitespace _

RankUserSizeTimeDateStatistics
1kaz_u940.20812015/05/25 23:16:450B / 0B / 0B
2%20980.06612015/05/26 00:37:190B / 0B / 0B

GolfScript _

RankUserSizeTimeDateStatistics
1mitchs192.80622017/08/16 02:20:410B / 1B / 18B
2mitchs (alt)190.40302017/08/16 05:21:120B / 3B / 16B
3narb200.43902011/05/03 21:33:360B / ?B / ?B
4clock200.39382013/03/03 21:16:360B / 2B / 18B
5twobit240.22882011/05/03 07:21:220B / 5B / 18B

gs2 _

RankUserSizeTimeDateStatistics
1tails70.17852017/08/09 19:32:350B / 3B / 4B
2mitchs70.25192017/08/16 11:44:040B / 3B / 4B
3whio80.17962017/08/09 00:12:351B / 3B / 4B

FlogScript _

RankUserSizeTimeDateStatistics
1clock170.84932012/08/26 15:11:450B / 4B / 13B
2zzo38192.86402011/06/09 04:55:160B / 1B / 17B

Burlesque _

RankUserSizeTimeDateStatistics
1Hendrik160.04482014/06/22 17:50:090B / 8B / 8B
2teebee160.04572014/07/30 10:42:520B / 8B / 8B
3clock170.04812015/02/26 23:58:230B / 10B / 7B

z80 _

RankUserSizeTimeDateStatistics
1*yuko*480.42652011/06/09 23:15:1525B / 9B / 12B

Vim _

RankUserSizeTimeDateStatistics
1clock330.85582012/05/05 16:21:523B / 19B / 10B

Groovy _

RankUserSizeTimeDateStatistics
1nn606.34582011/05/15 20:14:020B / 41B / 16B
2teebee606.32612011/06/12 08:40:070B / 38B / 20B
3clock606.97062012/05/05 16:35:140B / 42B / 17B

Scala _

RankUserSizeTimeDateStatistics
1clock496.68752012/09/10 08:22:220B / 37B / 11B
2teebee496.90352012/10/28 06:49:490B / 37B / 12B
3Hendrik504.59352017/11/25 23:29:360B / 37B / 12B
4murky-satyr5119.52462011/06/16 01:45:300B / 38B / 12B

Logo _

RankUserSizeTimeDateStatistics
1teebee350.03132011/06/09 06:54:400B / 25B / 6B
2clock350.03642012/10/15 17:31:410B / 25B / 6B

Language Ranking_

RankLangUserSizeScore
1gs2tails710000
2Bashnarb154666
3Zshnarb154666
4Fishnarb154666
5BurlesqueHendrik164375
6dcnarb174117
7Kteebee174117
8FlogScriptclock174117
9GolfScriptmitchs193684
10AWKninjalj213333
11xgawkninjalj213333
12JI., S.252800
13jqteebee252800
14Perltails282500
15Perl6teebee292413
16Rubyleonid322187
17Vimclock332121
18Logoteebee352000
19Arcclock352000
20PARI/GPteebee352000
21BASICclock371891
22Octaveteebee371891
23Pythonkaki381842
24Rclock411707
25Bash (builtins)tails411707
26Asymptoteteebee421666
27Python3llhuii441590
28bcteebee451555
29JavaScriptxulapp461521
30A+teebee461521
31PHPteebee461521
32Maximaclock461521
33Chapelclock461521
34Fortran*yuko*471489
35Haskellnotogawa471489
36Prologteebee471489
37Clojureclock471489
38Schemekaki481458
39Luateebee481458
40z80*yuko*481458
41REXXclock481458
42Scalaclock491428
43Cyanteebee491428
44Common LISPkaki501400
45Tclclock511372
46REBOLclock521346
47Smalltalkclock541296
48SNOBOLclock551272
49QCLteebee571228
50Cleonid581206
51Iconteebee581206
52ObjCllhuii581206
53Groovynn601166
54Xtalteebee631111
55Ioteebee661060
56OCamlm.ukai671044
57Pascalteebee72972
58Piketeebee74945
59Kiteteebee85823
60Nemerleteebee92760
61Whitespacekaz_u94744
62Euphoriateebee99707
63Goteebee118593
64Erlangteebee120583
65C#Hendrik121578
66Javateebee129542
67Brainfuckmitchs164426
68COBOL*yuko*193362

return to the top page