Baekjoon 10250
ACM 호텔


QUESTION ❔



CODE ⌨️

#include <iostream>
#include <vector>

using namespace std;

int T;
int H, W, N;
int yy, xx;

vector<int> answer;

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);

	cin >> T;

	for (int i = 0; i < T; i++)
	{
		cin >> H >> W >> N;

		yy = N % H;
		xx = N / H;

		if (yy == 0)
		{
			yy = H;
		}
		else
		{
			xx += 1;
		}

		answer.push_back(yy * 100 + xx);
	}

	for (int i = 0; i < answer.size(); i++)
	{
		cout << answer[i] << "\n";
	}

	return 0;
}



RESULT 💛



SIMPLE DISCUSSION ✏️

구현 관련 문제였다.



SOURCE 💎

Baekjoon_Link 👈 Click here


*****
NOT A TALENT ❎ NOT GIVING UP ✅
CopyRight ⓒ 2022 DCherish All Rights Reserved.