fork download
  1. a=[]
  2. n=int(input())
  3. for i in range(0,n):
  4. f=(int,input())
  5. a.append(f)
  6. sum=0
  7. ans=0
  8. for i in range(0,n-2):
  9. sum=0
  10. for f in range(i,i+3):
  11. sum=sum+a[f]
  12. if(sum>ans):
  13. ans=sum
  14. z=f
  15. print(ans)
  16. print(z)
Runtime error #stdin #stdout #stderr 0.02s 28384KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 2, in <module>
EOFError: EOF when reading a line