Advertisement
Spocoman

03. Harvest

Dec 18th, 2021
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. import math
  2. x = int(input())
  3. y = float(input())
  4. z = int(input())
  5. workers = int(input())
  6. wine = 0.4 * x * y / 2.5
  7.  
  8. if wine < z:
  9.     print(f'It will be a tough winter! More {math.floor(z - wine)} liters wine needed.')
  10. else:
  11.     print(f'Good harvest this year! Total wine: {math.floor(wine)} liters.')
  12.     print(f'{math.ceil(wine - z)} liters left -> {math.ceil((wine - z) / workers)} liters per person.')
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement