Advertisement
Korotkodul

dem23.n23

Jun 17th, 2023
739
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. def f(a,b):
  2.     if a == b:
  3.         return 1
  4.     if a > b:
  5.         return 0
  6.     return f(a + 1, b) + f(a * 2, b)
  7.  
  8. A = f(1,10) * f(10,35)
  9. B = f(1,10) * f(10,17) * f(17,35)
  10. C = A - B
  11. print(C)
  12.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement