bounslay

Untitled

May 22nd, 2023
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. small_bottles = int(input())
  2. big_bottles = int(input())
  3. capacity = int(input())
  4.  
  5. loadedBig = capacity // 5
  6.  
  7. if loadedBig > big_bottles:
  8.     loadedBig = big_bottles
  9.  
  10. needed_small = capacity - 5 * loadedBig
  11.  
  12. if needed_small > small_bottles:
  13.     print("-1")
  14. else:
  15.     print(needed_small)
Advertisement
Add Comment
Please, Sign In to add comment