Advertisement
bl00dt3ars

05. Easter Bake

Oct 28th, 2020
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.52 KB | None | 0 0
  1. import math
  2. easter_bread = int(input())
  3. total_sugar = 0
  4. total_flour = 0
  5. max_sugar = 0
  6. max_floar = 0
  7.  
  8. for i in range(easter_bread):
  9.     sugar = int(input())
  10.     flour = int(input())
  11.     total_sugar += sugar
  12.     total_flour += flour
  13.     if sugar > max_sugar:
  14.         max_sugar = sugar
  15.     if flour > max_floar:
  16.         max_floar = flour
  17.  
  18. print(f"Sugar: {math.ceil(total_sugar / 950)}")
  19. print(f"Flour: {math.ceil(total_flour / 750)}")
  20. 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