Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- level_of_fire = input().split('#')
- water = int(input())
- total_effort = 0
- total_fire = 0
- buff = 'Cells:'
- fire_levels_dictionary = {
- 'High': {'min': 81,
- 'max': 125
- },
- 'Medium': {'min': 51,
- 'max': 80
- },
- 'Low': {'min': 1,
- 'max': 50
- }
- }
- for cell in level_of_fire:
- current_list = cell.split(' = ')
- fire = current_list[0]
- value = int(current_list[1])
- if fire_levels_dictionary[fire]['min'] <= value <= fire_levels_dictionary[fire]['max']:
- if water >= value:
- water -= value
- total_effort += value * 0.25
- buff += f'\n - {value}'
- total_fire += value
- print(buff)
- print(f'Effort: {total_effort:.2f}')
- print(f'Total Fire: {total_fire}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement