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