A parking lot in a mall has R×C number of parking spaces. Each parking space will either be empty (0) or full(1). The status (0/1) of a parking space is represented as the elements of the matrix. The task is to find index of the row(R) in the parking lot that has the most of the parking spaces full (1).
Answers
HI ANSWER SAY ed as the elements of the matrix. The task is to find index of the row(R) in the parking lot that has the most of the parking spaces full (1).ed as the elements of the matrix. The task is to find index of the row(R) in the parking lot that has the most of the parking spaces full (1).ed as the elements of the matrix. The task is to find index of the row(R) in the parking lot that has the most of the parking spaces full (1).ed as the elements of the matrix. The task is to find index of the row(R) in the parking lot that has the most of the parking spaces full (1).
PYTHON CODE
r=int(input())
c=int(input())
sum=0
m=0
id=0
for i in range(r):
for j in range(c):
sum+=int(input())
if sum>m:
m=sum
id=i+1
sum=0
print(id)
#SPJ2