Please read the new rule regarding the restriction on the use of AI tools. ×

dashrath1526's blog

By dashrath1526, history, 4 years ago, In English

Hi,

I am new to this platform and started solving problems by difficulty level starting from basic. This problem 116A-Tram, which gives task to find the trams min capacity. Submission Id: 90279549

It showing error on test #3, however when I runs the same code in my local machine its showing perfect answer which is 11. Screenshot is attached for output verification.

n = int(input())
stops = []
total = 0
for i in range(n):
    stop = list(map(int,input().split()))
    stops.append(stop)
    
max_total = stops[0][0]
for i in range(4):
    total = stops[i][1] + (total - stops[i][0])
        
    if total >= max_total:
        max_total = total
        
print(max_total)
  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

"wrong answer expected 18, found 11". You're supposed to output 18, not 11.