fork download
  1. N=int(input())
  2. parzyste=0
  3. suma=0
  4.  
  5. for i in range(N):
  6. x=int(input())
  7. if x%2==0: suma=suma+x
  8. if x%2==0: parzyste=parzyste+1
  9.  
  10.  
  11. print(suma/parzyste)
Success #stdin #stdout 0.07s 14052KB
stdin
6
1
2
3
4
5
6
stdout
4.0