Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def h(n):
- print 2**n-1
- def m(h,f,v,t):
- if h>0:m(h-1,f,t,v);print"Move disk from [%d] to [%d]"%(f,t);m(h-1,v,f,t)
- m(n,1,2,3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement