Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- small_bottles = int(input())
- big_bottles = int(input())
- capacity = int(input())
- loadedBig = capacity // 5
- if loadedBig > big_bottles:
- loadedBig = big_bottles
- needed_small = capacity - 5 * loadedBig
- if needed_small > small_bottles:
- print("-1")
- else:
- print(needed_small)
Advertisement
Add Comment
Please, Sign In to add comment