Advertisement
nq1s788

16

Jun 7th, 2025
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. #https://inf-ege.sdamgia.ru/problem?id=5057
  2. def f(n):
  3.     if n == 1:
  4.         return 3
  5.     if n == 2:
  6.         return 3
  7.     return 5 * f(n - 1) - 4 * f(n - 2)
  8.  
  9.  
  10. print(f(15))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement