22 lines
589 B
Python
22 lines
589 B
Python
from itertools import product, combinations, count
|
|
from timeit import repeat
|
|
|
|
# Генерируем все пары из двух списков
|
|
# for x in product([1,2], repeat=1):
|
|
# print(x)
|
|
#
|
|
#
|
|
# from itertools import product
|
|
# print(*(list(product('ЛНРТ', repeat=5))[149]))
|
|
#
|
|
#
|
|
# from itertools import product
|
|
# print([''.join(p) for p in product('ЛНРТ', repeat=5)][149])
|
|
|
|
a=0
|
|
collec=sorted(list(''.join(i) for i in product('СДАЙЕГЭ', repeat=6)))
|
|
for i in range(len(collec)):
|
|
# if 'ЕГЭ' in collec[i]:
|
|
if collec[i].count('ЕГЭ'):
|
|
a+=i+1
|
|
print(a) |