Guest User

Untitled

a guest
Nov 18th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.15 KB | None | 0 0
  1. #Lattice paths
  2.  
  3. def fact(n)
  4. if (n==1)
  5. return 1
  6. end
  7. return n*fact(n-1)
  8. end
  9.  
  10. def numPaths()
  11. p fact(40)/(fact(20)*fact(20))
  12. end
  13.  
  14. numPaths
Add Comment
Please, Sign In to add comment