Help me out with NOTARI problem(Pyhton)

Check my submissions don’t know what’s wrong…
My submissions

help me out:))

Hello,

On a first glance, I see two things:

  1. Indentation is not correct, and this is mandatory to be correct in Python, since whitespace is used as a delimiter;

and

  1. Using psyco module is usually discouraged since some compatibility issues with online judge are known;

Hope this helps,

Bruno

1 Like

from sys import stdin,stdout
from collections import deque
def main():
new_line=deque()
line=stdin.readline().split()
while int(line[0]) != 0:
for i in line:
new_line.append(int(i))
gab=new_line.popleft()
highest_number=max(new_line)
new_line.remove(highest_number)
sum_two_sides=0
count=0
j=0
while j<=len(new_line):
sum_two_sides=new_line(j)+new_line(j+1)
if sum_two_sides > highest_number:
count=count+1
j=j-1
line=stdin.readline().split()
print(count)
main()
What about this one…?

---------> j=0
----------> while j<=len(new_line):
sum_two_sides=new_line(j)+new_line(j+1)
if sum_two_sides > highest_number:
count=count+1
---------->j=j-1
line=stdin.readline().split()
print(count)

On the lines I signaled with an arrow, I believe that this while loop is not correct, since I am also assuming that the lenght of a line is at least a positive integer…

Maybe this can be one of your problems?

Bruno

//