Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- num = int(input())
- tank_liters = 0
- for i in range(num):
- current = int(input())
- if tank_liters + current <= 255:
- tank_liters += current
- else:
- print('Insufficient capacity!')
- print(tank_liters)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement