Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from itertools import *
- Max = 0
- A = []
- for elem in product("ГОНДУБШ", repeat = 6):
- A.append(elem)
- for i in range(len(A)):
- if i % 2 == 0 and A[i].count('Н') >= 2 and A[i].count('У') == 0 and A[i][0] != 'Б':
- Max = max(Max, i)
- print(Max + 1)
Advertisement
Add Comment
Please, Sign In to add comment