Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- numbers = int(input())
- p1 = 0
- p2 = 0
- p3 = 0
- for i in range(1, numbers+1):
- num = int(input())
- if num % 2 == 0:
- p1 += 1
- if num % 3 == 0:
- p2 += 1
- if num % 4 == 0:
- p3 += 1
- print(f"{p1/numbers*100:.2f}%")
- print(f"{p2/numbers*100:.2f}%")
- print(f"{p3/numbers*100:.2f}%")
Advertisement
Add Comment
Please, Sign In to add comment