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