Advertisement
nq1s788

23 с избегаемыми

Jan 6th, 2024
670
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. a = [0] * 17
  2. a[3] = 1
  3. for i in range(4, 17):
  4.     if i == 6 or i == 12:
  5.         continue
  6.     a[i] += a[i - 1]
  7.     if i % 2 == 0:
  8.         a[i] += a[i // 2]
  9.     a[i] += a[i - 3]
  10. print(a[16])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement