Advertisement
nq1s788

16

Sep 21st, 2024 (edited)
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.15 KB | None | 0 0
  1. def f(n):
  2.     if n == 1:
  3.         return 1
  4.     if n == 2:
  5.         return 2
  6.     if n == 3:
  7.         return 3
  8.     return f(n - 3) * n
  9.  
  10.  
  11. print(f(10))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement