Compare commits
10 Commits
6b62b0efb0
...
7aa4b53909
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7aa4b53909 | ||
|
|
f5d3dbe0e0 | ||
|
|
81d0645603 | ||
|
|
569de9a058 | ||
|
|
e07e2445bf | ||
|
|
444c46b695 | ||
|
|
557b0cb514 | ||
|
|
3a016aaca3 | ||
|
|
1875a07fa8 | ||
|
|
3f866f753e |
12
17.py
Normal file
12
17.py
Normal file
@@ -0,0 +1,12 @@
|
||||
b=ma=0
|
||||
f=open('17_1.txt')
|
||||
mi=10**10
|
||||
o=[int(i) for i in f]
|
||||
for i in range(len(o)):
|
||||
if abs(o[i])%10==6:
|
||||
mi=min(mi,o[i])
|
||||
for i in range(len(o)-1):
|
||||
if ((abs(o[i])%10==6 and abs(o[i+1])%10!=6) or (abs(o[i])%10!=6 and abs(o[i+1])%10==6)) and (o[i]**2+o[i+1]**2)< mi**2:
|
||||
b+=1
|
||||
ma=max(ma,(o[i]**2+o[i+1]**2))
|
||||
print(b,ma)
|
||||
28
8.py
28
8.py
@@ -1,13 +1,25 @@
|
||||
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])
|
||||
|
||||
# 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)
|
||||
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=[i for i in product([i for i in range(20)],repeat = 5)]
|
||||
print(a)
|
||||
19
f.py
19
f.py
@@ -1,7 +1,12 @@
|
||||
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)
|
||||
# Тип 6 № 43583
|
||||
dict1=dict()
|
||||
count=0
|
||||
for A in range(101):
|
||||
for i in range(9):
|
||||
s = int(input())
|
||||
t = int(input())
|
||||
if (s > A) or (t > 11):
|
||||
count+=1
|
||||
if count==4:
|
||||
dict1[A] = count
|
||||
count=0
|
||||
Reference in New Issue
Block a user