8
This commit is contained in:
27
8.py
27
8.py
@@ -1,13 +1,22 @@
|
||||
from itertools import product, combinations, count
|
||||
from timeit import repeat
|
||||
|
||||
# Генерируем все пары из двух списков
|
||||
for x in product([1,2], repeat=1):
|
||||
print(x)
|
||||
# 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])
|
||||
|
||||
|
||||
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)
|
||||
Reference in New Issue
Block a user