VioletaBabel

10250번: ACM 호텔 본문

백준/백준-C++
10250번: ACM 호텔
Beabletoet 2017. 1. 27. 17:05

#include <iostream>

using namespace std;

int main()

{

int T, H, W, N, x = 1;

cin >> T;

for (int i = 0; i < T; ++i)

{

cin >> H >> W >> N;

while (N > H)

{

++x;

N -= H;

}

cout << N;

if (x < 10) cout << 0;

cout << x << endl;

x = 1;

}

}

'백준 > 백준-C++' 카테고리의 다른 글

2775번: 부녀회장이 될테야  (0) 2017.01.28
1924번: 2007년  (0) 2017.01.27
1011번: Fly me to the alpha centauri  (0) 2017.01.27
1193번: 분수찾기  (0) 2017.01.27
2292번: 벌집  (0) 2017.01.27
Comments