#include <iostream>
const int FindOutRoom(const int H, const int W, const int N)
{
int HeightFloor;
int WidthFloor;
if (N % H == 0)
{
HeightFloor = H;
WidthFloor = (N / H);
}
else
{
HeightFloor = (N % H);
WidthFloor = (N / H) + 1;
}
return (HeightFloor * 100) + WidthFloor;
}
int main(void)
{
std::cin.tie(NULL);
std::cout.tie(NULL);
std::ios::sync_with_stdio(false);
int T = 0, H = 0, W = 0, N = 0;
std::cin >> T;
for (int i = 0; i < T; i++)
{
std::cin >> H >> W >> N;
std::cout << FindOutRoom(H, W, N) << "\n";
}
return 0;
}
10250번: ACM 호텔 (acmicpc.net)