Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = [0] * 10 #до 20
- a[2] = 1
- for i in range(2, 10):
- if i + 1 <= 9:
- a[i + 1] += a[i]
- if i + 2 <= 9:
- a[i + 2] += a[i]
- if i + i - 1 <= 9:
- a[i + i - 1] += a[i]
- print(a[9])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement