Sharkovskii order by rst76

import List
main=interact(\x->sort[(9!read y,y++"\n")|y<-lines x]>>=snd)
x!y|y<2=x|odd y=y-x^9;x+1!y=x!div y 2

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

download

return to the top page