fork download
  1. from array import array
  2. X=array("i")
  3. N=int(input())
  4. S=0
  5. X=[0]*N
  6. for i in range(0,N):
  7. X[i]=int(input())
  8. for i in range(0,N):
  9. if X[i]%2==0 and i%2==1:
  10. S+=X[i]
  11. print(S)
Success #stdin #stdout 0.03s 9364KB
stdin
5
10
22
31
94
67
stdout
116