백준 4796 캠핑

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

#include <iostream>
#include <vector>

using namespace std;

int main() {
    int L, P, V;
    int t=1;
    while (true) {
        cin >> L >> P >> V;
        if (L == 0 && P == 0 && V == 0) {
            break;
        }
        cout<<"Case "<<t<<": "<<(V/P)*L+min(L, V%P)<<'\n';
        t++;
    }

    //std::cout << "Hello, World!" << std::endl;
    return 0;
}

[jungin]
Written by@[jungin]
안녕하세요

GitHub