Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- list_cells = input().split("#")
- quantity_water = int(input())
- type_fire = ""
- High = 0
- Medium = 0
- Low = 0
- effort = 0
- print("Cells:")
- total_fire = 0
- for cells in range(len(list_cells)):
- type_fire = list_cells[cells]
- type_fire, value = type_fire.split(" =")
- value = int(value)
- if type_fire == "High":
- High = value
- if 81 <= High <= 125 and quantity_water - High > 0:
- quantity_water = quantity_water - High
- effort += 0.25 * High
- total_fire += High
- print(f"- {High}")
- elif type_fire == "Medium":
- Medium = value
- if 51 <= Medium <= 80 and quantity_water - Medium > 0:
- quantity_water = quantity_water - Medium
- effort += 0.25 * Medium
- total_fire += Medium
- print(f"- {Medium}")
- else:
- Low = value
- if 1 <= Low <= 50 and quantity_water - Low > 0:
- quantity_water = quantity_water - Low
- effort += 0.25 * Low
- total_fire += Low
- print(f" - {Low}")
- print(f"Effort: {effort:.2f}")
- print(f"Total Fire: {total_fire}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement