dxnge

task 13

Sep 25th, 2021
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. def f(a, b):
  2.     if a > b:
  3.         return 0
  4.     if a == b:
  5.         return 1
  6.     if a < b:
  7.         return f(a+1, b) + f(a+2, b)
  8.  
  9.  
  10. print(f(2, 9)*f(9, 18) - f(2, 9)*f(9, 14)*f(14, 18))
Advertisement
Add Comment
Please, Sign In to add comment