4796 : 캠핑

풀이

룰루랄라

코드

#include <stdio.h>
int a, b, c, d;
int main() {
	while (1) {
		scanf("%d %d %d", &a, &b, &c);
		if (!a && !b && !c) break;
		printf("Case %d: %d\n", ++d, c/b*a + (c%b < a ? c%b : a));
	}
	return 0;
}

아무말

백준, 백준 온라인 저지, BOJ, Baekjoon Online Judge, C, C++, 씨, 씨쁠쁠, JAVA, algorithm, 자바, 알고리즘, 자료구조, 문제, 문제 풀이, 풀이

wookje.kwon's profile image

wookje.kwon

2018-02-02 16:44

Read more posts by this author