Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import itertools
- import re
- c = 0
- for i in itertools.permutations("МИТРОФАН", r = 6):
- i = ''.join(i)
- if (len(re.findall(r'[ИОА]', i)) < 3) and (len(re.findall(r'[ИОА][ИОА]', i)) == 0):
- c += 1
- print(c)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement