bl00dt3ars

06. The Office

Jun 23rd, 2021
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.51 KB | None | 0 0
  1. employess_happiness = [int(num) for num in input().split()]
  2. factor = int(input())
  3. calculated_happiness = [num * factor for num in employess_happiness]
  4. happy_employess = [el for el in calculated_happiness if el >= sum(calculated_happiness) / len(calculated_happiness)]
  5. if len(happy_employess) >= len(calculated_happiness) // 2:
  6.     print(f"Score: {len(happy_employess)}/{len(calculated_happiness)}. Employees are happy!")
  7. else:
  8.     print(f"Score: {len(happy_employess)}/{len(calculated_happiness)}. Employees are not happy!")
Advertisement
Add Comment
Please, Sign In to add comment