python-algorithm
백준 4796 캠핑
무적김두칠
2021. 12. 14. 14:41
1
2
3
4
5
6
7
8
|
cnt=1
while 1:
l,p,v=map(int,input().split())
if l==0 and p==0 and v==0 : break
else:
ans= (v//p)*l + min(v%p,l)
print("Case %d: %d"%(cnt,ans))
cnt+=1
|
cs |
반응형