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