Advertisement
nq1s788

23 с изб и с огр

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