슈콩

[BOJ] 백준 10250 ACM 호텔 본문

Algorithms/Baekjoon

[BOJ] 백준 10250 ACM 호텔

shukong 2025. 9. 7. 00:29

[문제]

https://www.acmicpc.net/problem/10250

 

 

[소스 코드]

import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) throws IOException {
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	StringTokenizer st;
    	int T = Integer.parseInt(br.readLine());
    	while(T-->0) {
    		st = new StringTokenizer(br.readLine());
    		int h = Integer.parseInt(st.nextToken());
    		int w = Integer.parseInt(st.nextToken());
    		int n = Integer.parseInt(st.nextToken());
    		int result = 0;
    		result += n%h*100;
    		if(result==0) result = h*100;
    		result += (n-1)/h + 1;
    		System.out.println(result);
    	}
    }
}

'Algorithms > Baekjoon' 카테고리의 다른 글

[BOJ] 백준 10610 30  (0) 2025.09.08
[BOJ] 백준 1038 감소하는 수  (0) 2025.09.08
[BOJ] 백준 1019 책 페이지  (0) 2025.09.06
[BOJ] 백준 1011 Fly me to the Alpha Centauri  (0) 2025.09.06
[BOJ] 백준 11051 이항계수2  (0) 2025.09.05