Advertisement
stupid_pro

Untitled

Feb 11th, 2023
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. s = 'ДЕРВО'
  2. c = 0
  3. for i in s:
  4. for j in s:
  5. for k in s:
  6. for q in s:
  7. for w in s:
  8. for r in s:
  9. word = i + j + k + q + w + r
  10. if word[0] <= word[2] <= word[4] and word[1] <= word[3] <= word[5]:
  11. c += 1
  12. print(c)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement