GroZnik81

Untitled

Nov 19th, 2020
24
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. number_of_water = int(input())
  2.  
  3. TANK_LITER = 255
  4.  
  5. sum_of_water_overflow = 0
  6.  
  7. for water_cup in range(0, number_of_water + 1):
  8.  
  9. water_cup = int(input())
  10.  
  11. if sum_of_water_overflow < TANK_LITER:
  12. sum_of_water_overflow += water_cup
  13. if sum_of_water_overflow > TANK_LITER:
  14. sum_of_water_overflow -= water_cup
  15. print("Insufficient capacity!")
  16. print(f"{sum_of_water_overflow}")
RAW Paste Data