From 3f866f753ec4384cc384cbbf91b683c1319e847a Mon Sep 17 00:00:00 2001 From: Victor Alexandrovich Tsyrenschikov <77172321+tsyrenschikov@users.noreply.github.com> Date: Tue, 10 Feb 2026 13:17:29 +0500 Subject: [PATCH] 8 --- 8.py | 27 ++++++++++++++++++--------- f.py | 8 +------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/8.py b/8.py index 774615b..72d8335 100644 --- a/8.py +++ b/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]) \ No newline at end of file +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) \ No newline at end of file diff --git a/f.py b/f.py index 61ef557..3da8c99 100644 --- a/f.py +++ b/f.py @@ -1,7 +1 @@ -sum_i=0 -for i in range(int(input('Введите число последовательности: '))): - a=int(input('Введите числа')) - if a%5==0 and a>sum_i: - sum_i=a - -print(sum_i) \ No newline at end of file +print(max([int(input()) for i in range(int(input()))])) \ No newline at end of file