Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- k = int(input())
- e=0
- h=0
- t=0
- q=0
- w=0
- A = []
- for i in range(k):
- A.append(int(input()))
- while e<len(A):
- if A[e]%2==0:
- h+=A[e]
- t+=1
- e+=1
- else:
- q+=A[e]
- w+=1
- e+=1
- print(h/t,q/w)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement