BOJ - 4796 - 캠핑

Updated:

import sys

def solution():
    idx = 1
    while True:
        L, P, V = map(int, sys.stdin.readline().split())
        if L + P + V == 0: return

        ret = (V // P) * L
        ret += min((V % P), L)
        print('Case %d: %d' %(idx, ret))
        idx += 1


solution()

https://www.acmicpc.net/problem/4796

Categories:

Updated:

Leave a comment