Sharkovskii order by nn

for(a=[];v=readline(i=6);it[v]=u-1?v-4e7*i:4e7-v)for(a.push(u=v);u%2?0:i--;)u/=2
print(a.sort(function(x,y)it[x]-it[y]).join('\n'))

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page