Войти
или
Зарегистрироваться
Курсы
Учебник
Учебник 2.0
ОГЭ/ЕГЭ
Олимпиады
Рубрикатор
Компилятор
Статья Автор:
Никифоров Георгий
тетрадь 1
#5 n, p = map(int, input().split()) m = [] for i in range(0, n): m.append(int(input())) k = 0 for i in range(0, n): x = m[i] s = x if x <= p: b = True j = i + 1 while j != n and b: s = s + m[j] if s > p: b = False if j - i > k: k = j - i j = j + 1 print(k)
×
#7 n = int(input()) m = [] for i in range(0, n): m.append(int(input())) k = 0 for i in range(0, n): x = m[i] for j in range(i + 1 , n): s = x * m[j] sm = x + m[j] if abs(j - i) >= 25 and sm%4 == 0 and s%9009 == 0: k = k + 1 print(k) #f = open(input(), 'r') #n = int(f.readline().split()) #m = f.readlines() #m = filter(lambda x: x!= '\n', m) #m =list(map(int, m))
×
#1 n = int(input()) m = [] for i in range(0, n): m.append(int(input())) k = 0 for i in range(0, n): x = m[i] for j in range(i + 1 , n): s = x * m[j] if s%(10**6) == 0 and s%(10**7) != 0: k = k + 1 print(k) #f = open(input(), 'r') #n = int(f.readline()) #m = f.readlines() #m = filter(lambda x: x!= '\n', m) #m =list(map(int, m))
×
#2 n = int(input()) m = [] for i in range(0, n): m.append(int(input())) k = 0 for i in range(0, n): x = m[i] for j in range(i + 1 , n): s = x * m[j] sm = x + m[j] if sm%11 == 0 and s%2310 == 0: k = k + 1 print(k) #f = open(input(), 'r') #n = int(f.readline().split()) #m = f.readlines() #m = filter(lambda x: x!= '\n', m) #m =list(map(int, m))
×
от Никифоров Георгий 11.10.2024 10:59
#5
n, p = map(int, input().split())
m = []
for i in range(0, n):
m.append(int(input()))
k = 0
for i in range(0, n):
x = m[i]
s = x
if x <= p:
b = True
j = i + 1
while j != n and b:
s = s + m[j]
if s > p:
b = False
if j - i > k:
k = j - i
j = j + 1
print(k)
#f = open(input(), 'r')
#n = int(f.readline().split())
#m = f.readlines()
#m = filter(lambda x: x!= '\n', m)
#m =list(map(int, m))
от Никифоров Георгий 11.10.2024 11:00
//7
n = int(input())
m = []
for i in range(0, n):
m.append(int(input()))
k = 0
for i in range(0, n):
x = m[i]
for j in range(i + 1 , n):
s = x * m[j]
sm = x + m[j]
if abs(j - i) >= 25 and sm%4 == 0 and s%9009 == 0:
k = k + 1
print(k)
#f = open(input(), 'r')
#n = int(f.readline().split())
#m = f.readlines()
#m = filter(lambda x: x!= '\n', m)
#m =list(map(int, m))
от Никифоров Георгий 11.10.2024 11:13
n = int(input().split())
m = []
for i in range(0, n):
m.append(int(input()))
k = 0
for i in range(0, n):
x = m[i]
for j in range(i + 1 , n):
s = x * m[j]
if s%(10**6) == 0 and s%(10**7) != 0:
k = k + 1
print(k)
#f = open(input(), 'r')
#n = int(f.readline().split())
#m = f.readlines()
#m = filter(lambda x: x!= '\n', m)
#m =list(map(int, m))
от Никифоров Георгий 11.10.2024 11:03
n = int(input().split())
m = []
for i in range(0, n):
m.append(int(input()))
k = 0
for i in range(0, n):
x = m[i]
for j in range(i + 1 , n):
s = x * m[j]
sm = x + m[j]
if sm%11 == 0 and s%2310 == 0:
k = k + 1
print(k)
#f = open(input(), 'r')
#n = int(f.readline().split())
#m = f.readlines()
#m = filter(lambda x: x!= '\n', m)
#m =list(map(int, m))
от Никифоров Георгий 11.10.2024 11:08
Чтобы оставить комментарий нужна авторизация
Печать