n, m = map(int, input().split())
lst = [[int(x) for x in input().split()] for _ in range(n)]
k, row = int(input()), []
for i in range(n):
count = 0
for j in range(m):
if lst[i][j] == 0:
count += 1
if count == k:
row.append(i + 1)
if lst[i][j] == 1:
print(min(row, default=0))
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
n, m = map(int, input().split())
lst = [[int(x) for x in input().split()] for _ in range(n)]
k, row = int(input()), []
for i in range(n):
count = 0
for j in range(m):
if lst[i][j] == 0:
count += 1
if count == k:
row.append(i + 1)
if lst[i][j] == 1:
count = 0
print(min(row, default=0))
break выделяется как ошибка, можете подумать ещё?