Advertisement
simeonshopov

Harvest

Sep 10th, 2019
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 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=(x*0.4*y)/2.5
  7. if wine<z:
  8.   print(f"It will be a tough winter! More {int(z-wine)} liters wine needed.")
  9. elif wine>z:
  10.   print(f"Good harvest this year! Total wine: {math.floor(wine)} liters.")
  11.   print(f"{math.ceil(wine-z)} liters left -> {math.ceil((wine-z)/workers)} liters per person.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement