Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def f(st,x):
- if st==x:
- return 1
- if st>x:
- return 0
- k=f(st,x-1)
- if x%2==0:
- k+=f(st,x-1)
- if x%2!=0:
- k+=f(st,x-2)
- k+=f(st,x//2)
- return k
- print(f(3,9)*f(9,17)*f(17,25))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement