Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = [0] * 31
- a[1] = 1
- for i in range(2, 11):
- a[i] += a[i - 1]
- if i % 2 == 0:
- a[i] += a[i // 2]
- for i in range(11, 22):
- a[i] += a[i - 1]
- if i % 2 == 0 and i // 2 >= 10:
- a[i] += a[i // 2]
- for i in range(22, 31):
- a[i] += a[i - 1]
- if i % 2 == 0 and i // 2 >= 21:
- a[i] += a[i // 2]
- print(a[30])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement