Power Tree slow

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

Print Knuth's power tree (http://oeis.org/A122352), or an addition chain from the tree.

Options

exec is denied

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

Sample input:_

t100

Sample output:

1 2 2 3 3 5 4 6 5 10 6 10 7 10 8 16 9 14 10 14 11 13 12 15 13 18 14 28 15 28 16 17 17 21 18 36 19 26 20 40 21 40 22 30 23 42 24 48 25 48 26 52 27 44 28 38 29 31 30 56 31 42 32 64 33 66 34 46 35 57 36 37 37 50 38 76 39 76 40 41 41 43 42 80 43 84 44 47 45 70 46 62 47 57 48 49 49 51 50

Sample input:_

c100

Sample output:

1 2 3 5 10 15 25 50 100

Sample input:_

c2043

Sample output:

1 2 3 5 7 14 28 56 112 115 227 454 681 1362 2043

Ranking

Python _

RankUserSizeTimeDateStatistics
1hallvabo1882.19882011/09/22 23:51:42103B / 57B / 28B
2boothby2140.12852011/09/11 07:50:497B / 113B / 69B

JavaScript _

RankUserSizeTimeDateStatistics
1nn1710.19052011/09/18 21:07:130B / 76B / 89B
2_1930.06672011/09/10 10:46:220B / 85B / 100B

J _

RankUserSizeTimeDateStatistics
1I., S.(slow)1100.59252011/09/16 20:45:320B / 34B / 74B
2I., S.1120.21962011/09/12 22:30:330B / 35B / 72B
3pooq1740.10372011/09/10 11:51:570B / 100B / 51B

C _

RankUserSizeTimeDateStatistics
1nn2100.05322011/09/19 14:54:150B / 90B / 118B

Groovy _

RankUserSizeTimeDateStatistics
1nn1777.94992011/09/19 15:47:290B / 77B / 91B

Language Ranking_

RankLangUserSizeScore
1JI., S.(slow)11010000
2JavaScriptnn1716432
3Groovynn1776214
4Pythonhallvabo1885851
5Cnn2105238

return to the top page