Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = [0] * 15
- a[2] = 1
- for i in range(3, 15):
- if i == 5 or i == 10:
- continue
- a[i] += a[i - 1]
- if i % 2 == 0:
- a[i] += a[i // 2]
- if i - 3 >= 0:
- a[i] += a[i - 3]
- print(a[14])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement