You are viewing a single comment's thread. Return to all comments →
q = [] n = int(input()) temp = 0 for _ in range(n): f,d = map(int,input().split(' ')) temp = temp + (f-d) q.append(temp) pos = q.index(min(q)) if pos == n-1: print(0) else: print(pos + 1)
Seems like cookies are disabled on this browser, please enable them to open this website
Truck Tour
You are viewing a single comment's thread. Return to all comments →