nq1s788

8

Oct 19th, 2025
1,633
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.44 KB | None | 0 0
  1. #https://inf-ege.sdamgia.ru/problem?id=59686
  2. alph = 'АГМНСТУ'
  3. ind = 0
  4. for q in alph:
  5.     for w in alph:
  6.         for e in alph:
  7.             for r in alph:
  8.                 for t in alph:
  9.                     for y in alph:
  10.                         ind += 1
  11.                         s = q + w + e + r + t + y
  12.                         if s[0] != 'У' and s.count('М') == 2 and s.count('Г') <= 1:
  13.                             print(ind)
Advertisement
Add Comment
Please, Sign In to add comment