def setup():
floor1=[14,25,18,38]#building[0][0-3]
floor2=[34,21,48,24]#building[1][0-3]
floor3=[48,29,12,48]#building[2][0-3]
building = [floor1,floor2,floor3]
findRoomWithMaxChair(building)
def findRoomWithMaxChair(a):
i=0
j=0
maximum=0
while(j<len(a)):
while(i<len(a[j])):
if(maximum<a[j][i]):
maximum=a[j][i]
i=i+1
i=0
j=j+1
i=0
j=0
while(j<len(a)):
while(i<len(a[j])):
if(maximum == a[j][i]):
print('floor index:',j,',room index:',i)
i=i+1
i=0
j=j+1
setup()
ไม่มีความคิดเห็น:
แสดงความคิดเห็น