728x90
출처-https://www.acmicpc.net/problem/10250
728x90
import java.util.*;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner scan = new Scanner(System.in);
int t = scan.nextInt();
int room[] = new int[t];
for (int i=0; i<t; i++) {
int h = scan.nextInt();
int w = scan.nextInt();
int n = scan.nextInt();
int height;
int width;
if (n%h == 0) {
height = h;
width = n/h;
}
else {
height = n%h;
width = n/h+1;
}
room[i]=height*100+width;
}
for (int i=0; i<t; i++)
System.out.println(room[i]);
}
}
728x90
'Problem Solving > BOJ' 카테고리의 다른 글
[백준, BOJ 1011] Fly to the Alpha Centauri (java) (0) | 2020.09.06 |
---|---|
[백준, BOJ 2775] 부녀회장이 될테야 (java) (0) | 2020.09.06 |
[백준, BOJ 2869] 달팽이는 올라가고 싶다 (java) (0) | 2020.09.04 |
[백준, BOJ 1193] 분수찾기 (java) (0) | 2020.09.04 |
[백준, BOJ 2292] 벌집 (java) (0) | 2020.09.04 |