Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- easter_bread = int(input())
- sugar_used = 0
- flour_used = 0
- max_flour = 0
- max_sugar = 0
- for i in range(1, easter_bread + 1):
- current_sugar = int(input())
- sugar_used += current_sugar
- if current_sugar > max_sugar:
- max_sugar = current_sugar
- current_flour = int(input())
- flour_used += current_flour
- if current_flour > max_flour:
- max_flour = current_flour
- sugar = math.ceil(sugar_used / 950)
- flour = math.ceil(flour_used / 750)
- print(f'Sugar: {sugar}')
- print(f'Flour: {flour}')
- print(f'Max used flour is {max_flour} grams, max used sugar is {max_sugar} grams.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement