ary[int(sys.stdin.readline()) - 1] += 1 if i > 0 else ary[int(sys.stdin.readline())]+=1

뒷부분에 + 앞에 end of statement  expected 랑 1앞에 statement expected,found Py:PLUSEQ  에러뜸