Advertisement
Spocoman

Football League

Feb 22nd, 2022 (edited)
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.49 KB | None | 0 0
  1. capacity_stadium = int(input())
  2. fans = int(input())
  3. counter_A = 0
  4. counter_B = 0
  5. counter_V = 0
  6. counter_G = 0
  7.  
  8. for fan in range(fans):
  9.     sector = input()
  10.     if sector == "A":
  11.         counter_A += 1
  12.     elif sector == "B":
  13.         counter_B += 1
  14.     elif sector == "V":
  15.         counter_V += 1
  16.     elif sector == "G":
  17.         counter_G += 1
  18.  
  19. for i in [counter_A, counter_B, counter_V, counter_G]:
  20.     print(f'{i / fans * 100:.2f}%')
  21.  
  22. print(f'{fans / capacity_stadium * 100:.2f}%')
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement