Farz0l1x

Untitled

Dec 25th, 2023
1,052
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. from itertools import *
  2. Max = 0
  3. A = []
  4. for elem in product("ГОНДУБШ", repeat = 6):
  5.     A.append(elem)
  6. for i in range(len(A)):
  7.     if i % 2 == 0 and A[i].count('Н') >= 2 and A[i].count('У') == 0 and A[i][0] != 'Б':
  8.         Max = max(Max, i)
  9. print(Max + 1)
Advertisement
Add Comment
Please, Sign In to add comment