Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def f(n):
- if n == 1:
- return 1
- if n == 2:
- return 3
- return f(n - 1) * n + f(n - 2) * (n - 1)
- print(f(5))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement