Advertisement
nq1s788

23 c обязательной

Dec 23rd, 2023
1,016
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] * 16
  2. a[1] = 1
  3. for i in range(2, 9):
  4.     a[i] += a[i - 1]
  5.     if i - 3 >= 0:
  6.         a[i] += a[i - 3]
  7. for i in range(9, 16):
  8.     a[i] += a[i - 1]
  9.     if i - 3 >= 8:
  10.         a[i] += a[i - 3]
  11. print(a[16])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement