Advertisement
pavlinski78

Untitled

Dec 5th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. n=int(input())
  2. p1=0
  3. p2=0
  4. p3=0
  5. for i in range(n):
  6.     current_number=int(input())
  7.     if current_number%2==0:
  8.         p1+=1
  9.     if current_number%3==0:
  10.         p2+=1
  11.     if current_number%4==0:
  12.         p3+=1
  13. print(f"{p1/n*100:.2f}%")
  14. print(f"{p2/n*100:.2f}%")
  15. print(f"{p3/n*100:.2f}%")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement