Advertisement
Spocoman

AND Processors

Aug 21st, 2022
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 KB | None | 0 0
  1. processors = int(input())
  2. workers = int(input())
  3. days = int(input())
  4.  
  5. diff = (processors - workers * days * 8 // 3) * 110.10
  6.  
  7. if diff > 0:
  8.     print(f"Losses: -> {diff:.2f} BGN")
  9. else:
  10.     print(f"Profit: -> {abs(diff):.2f} BGN")
  11.  
  12.  
  13. Тарикатско решение и с тернарен оператор:
  14.  
  15. diff = (int(input()) - int(input()) * int(input()) * 8 // 3) * 110.10
  16. print(f"{'Losses' if diff > 0 else 'Profit'}: -> {abs(diff):.2f} BGN")
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement