Advertisement
Guest User

Untitled

a guest
Jul 6th, 2015
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.13 KB | None | 0 0
  1. def h(n):
  2. print 2**n-1
  3. def m(h,f,v,t):
  4. if h>0:m(h-1,f,t,v);print"Move disk from [%d] to [%d]"%(f,t);m(h-1,v,f,t)
  5. m(n,1,2,3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement