Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- a = list(map(int, input().split()))
- n=a[0]
- k4=a[1]
- k2=a[2]
- k=math.ceil(n/4)
- kFloor=n//4
- if k<=k4:
- print(k)
- else:
- m=math.ceil((n-kFloor*4)/2)
- if m<=k2:
- print(k+m)
- else:
- print(-1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement