Advertisement
nq1s788

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

Dec 23rd, 2023
982
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. a = [0] * 15
  2. a[2] = 1
  3. for i in range(3, 15):
  4.     if i == 5 or i == 10:
  5.         continue
  6.     a[i] += a[i - 1]
  7.     if i % 2 == 0:
  8.         a[i] += a[i // 2]
  9.     if i - 3 >= 0:
  10.         a[i] += a[i - 3]
  11. print(a[14])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement