728x90
package BAEKJOON;
import java.util.Scanner;
public class NO10250 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for (int i = 0; i < t; i++) {
int h = sc.nextInt();
int w = sc.nextInt();
int n = sc.nextInt();
int x = n / h + 1; // 호수
int y = n % h; // 층수
if( n % h == 0 ) {
x = n / h ;
y = h;
}
System.out.println(y*100 + x);
}
}
}
728x90
'Algorithm & SQL > BAEKJOON' 카테고리의 다른 글
백준 JAVA 10757 큰 수 A+B (0) | 2022.07.12 |
---|---|
백준 JAVA 2775 부녀회장이 될테야 (0) | 2022.07.12 |
백준 JAVA 1712 손익분기점 (0) | 2022.07.12 |
백준 JAVA 1789 수들의 합 (0) | 2022.07.11 |
백준 JAVA 2869 달팽이는 올라가고 싶다 (0) | 2022.07.11 |
댓글