Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

Блог пользователя dashrath1526

Автор dashrath1526, история, 4 года назад, По-английски

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)
  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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