Advertisement
nq1s788

16 (рекурсия

Feb 7th, 2024
880
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.11 KB | None | 0 0
  1. def f(n):
  2.     if n == 1:
  3.         return 1
  4.     if n > 1:
  5.         return 5 * f(n - 1) + 3 * n
  6.  
  7.  
  8. print(f(4))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement