Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = [0] * 1000
- a[102] = 1
- for i in range(102, 43, -1):
- if i - 8 >= 43:
- a[i + 8] += a[i]
- if i // 2 >= 43:
- a[a * 2] += a[i]
- for i in range(43, 5, -1):
- if i - 8 >= 5:
- a[i+8] += a[i]
- if i // 2 >= 5:
- a[i*2] += a[i]
- print(a[18])
Advertisement
Add Comment
Please, Sign In to add comment