Farz0l1x

Untitled

Jan 15th, 2024
669
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. from itertools import *
  2. count = 0
  3. A = []
  4. for elem in product('АЕКПТЧ', repeat = 7):
  5.     s = ''.join(elem)
  6.     A.append(s)
  7. for i in range(len(A)):
  8.     if A[i] == 'АПТЕЧКА':
  9.         a1 = i + 1
  10.     if A[i] == 'ПЕЧАТКА':
  11.         a2 = i
  12. print(a2 - a1)
Advertisement
Add Comment
Please, Sign In to add comment