Advertisement
qekaqeka

code

Apr 9th, 2023
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. import itertools
  2. import re
  3.  
  4. c = 0
  5.  
  6. for i in itertools.permutations("МИТРОФАН", r = 6):
  7. i = ''.join(i)
  8. if (len(re.findall(r'[ИОА]', i)) < 3) and (len(re.findall(r'[ИОА][ИОА]', i)) == 0):
  9. c += 1
  10. print(c)
  11.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement