Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- num = int(input())
- current_litters = int(input())
- total_litters = 0
- over_flow = 0
- while True:
- total_litters += current_litters
- over_flow += 1
- if total_litters > 255:
- print("Insufficient capacity!")
- total_litters -= current_litters
- if over_flow == num:
- break
- current_litters = int(input())
- print(total_litters)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement