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