nq1s788

8 перебор с номером слова

Feb 9th, 2026
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.72 KB | None | 0 0
  1. #https://inf-ege.sdamgia.ru/problem?id=68241
  2. sogl = 'СКНР'
  3. alph = 'АЕКНРС'
  4. answ = 0
  5. k = 1
  6. for q in alph:
  7.     for w in alph:
  8.         for e in alph:
  9.             for r in alph:
  10.                 for t in alph:
  11.                     for y in alph:
  12.                         for u in alph:
  13.                             for i in alph:
  14.                                 for o in alph:
  15.                                     for p in alph:
  16.                                         s = q + w + e + r + t + y + u + i + o + p
  17.                                         if k % 3 == 0 and s[0] in sogl and s.count('Р') == 1:
  18.                                             answ += 1
  19.                                         k += 1
  20. print(answ)
Advertisement
Add Comment
Please, Sign In to add comment