fk

whitehousechef·2023년 10월 13일
0

케익 배달, https://www.acmicpc.net/problem/1072 게임

Total,cur = map(int, input().split())
Z = (cur//total)*100
print(z)
ans=0
left=1
right=total
While left<=right:
mid=left+(right-left)/2
new_z=(cur+mid)//(total+mid)*100
print(new_z)
If new_z<=z:
Left = mid+1
ans=mid
Else:
right=mid-1

If ans==0
print(-1)
Else:
print(ans)

0개의 댓글