Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. k = int(input())
  2. e=0
  3. h=0
  4. t=0
  5. q=0
  6. w=0
  7. A = []
  8. for i in range(k):
  9. A.append(int(input()))
  10. while e<len(A):
  11. if A[e]%2==0:
  12. h+=A[e]
  13. t+=1
  14. e+=1
  15. else:
  16. q+=A[e]
  17. w+=1
  18. e+=1
  19. print(h/t,q/w)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement