gimmickbutreal
[백준/자바] 10250번 해설 - Java 본문
https://www.acmicpc.net/problem/10250
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.BufferedReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str = br.readLine();
StringBuilder sb = new StringBuilder();
int T = Integer.parseInt(str);
for (int i = 0; i < T; i++){
StringTokenizer st = new StringTokenizer(br.readLine(), " ");
int H = Integer.parseInt(st.nextToken());
st.nextToken();
int N = Integer.parseInt(st.nextToken());
if (N % H == 0){
sb.append((H * 100) + (N / H)).append('\n');
} else{
sb.append(((N % H) * 100) + ((N / H) + 1)).append('\n');
}
}
System.out.print(sb);
}
}
|
cs |