BbJLeB

03. Harvest

May 10th, 2019
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.63 KB | None | 0 0
  1. import math
  2. x_quadro = int(input())
  3. grapes_per_kv = float(input())
  4. liters_wine = int(input())
  5. workers = int(input())
  6.  
  7. grapes = x_quadro * grapes_per_kv
  8. wines = (0.4 * grapes) / 2.5
  9.  
  10. if wines >= liters_wine:
  11.     wines1 = wines - liters_wine
  12.     kef = math.ceil((wines - liters_wine) / workers)
  13.     print(f"Good harvest this year! Total wine: {math.floor(wines)} liters.")
  14.     print(f"{math.ceil(wines1)} liters left -> {math.ceil(kef)} liters per person.")
  15. else:
  16.     #wines = math.ceil((0.4 * grapes) / 2.5)
  17.     wines2 = liters_wine - wines
  18.     print(f"It will be a tough winter! More {math.floor(wines2)} liters wine needed.")
Add Comment
Please, Sign In to add comment