Advertisement
Korotkodul

N23_easy

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