package ACMhotel;

import java.util.Scanner;

public class Main {
	public static void main(String args[]) {
		Scanner scan = new Scanner(System.in);
		int cnt = 0;
		cnt = scan.nextInt();
		int[] roomArr = new int[cnt];

		for (int i = 0; i < cnt; i++) {
			int H = 0, W = 0, N = 0;
			H = scan.nextInt();
			W = scan.nextInt();
			N = scan.nextInt();

			int room;
			room = (N - H * (N / H)) * 100 + (N / H) + 1;
			roomArr[i] = room;
		}
		for (int i = 0; i < cnt; i++) {
			System.out.println(roomArr[i]);
		}
	}
}

예제

 

+ Recent posts