Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #https://inf-ege.sdamgia.ru/problem?id=68241
- alph = 'АЕКНРС'
- sogl = 'СКНР'
- cnt = 0
- num = 1 #номер текущего слова
- for q in alph:
- for w in alph:
- for e in alph:
- for r in alph:
- for t in alph:
- for y in alph:
- for u in alph:
- for i in alph:
- for o in alph:
- for p in alph:
- s = q + w + e + r + t + y + u + i + o + p
- if (num % 3 == 0) and (s[0] in sogl) and (s.count('Р') == 1):
- cnt += 1
- num += 1
- print(cnt)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement