hours=[] for i in range(1,8): s,a=map(int,input().split()) if s+a>8: hours.append((i,s+a)) if hours==[]: print(0) else: print(max(hours,key=lambda x:x[1])[0])
没写注释