-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path_10250.java
More file actions
41 lines (35 loc) ยท 941 Bytes
/
_10250.java
File metadata and controls
41 lines (35 loc) ยท 941 Bytes
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
32
33
34
35
36
37
38
39
40
41
package backjoon;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
// https://www.acmicpc.net/problem/10250
// ACM ํธํ
public class _10250 {
public static void main(String[] args) throws IOException {
// memory 11788 runtime 92
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int leng = Integer.parseInt(br.readLine());
StringTokenizer st;
for(int i=0; i<leng; i++){
st = new StringTokenizer(br.readLine(), " "); //ํ ์ค์ฉ
int H = Integer.parseInt(st.nextToken());
Integer.parseInt(st.nextToken()); // W๋ ์ฌ์ฉํ ๊ณณ์ ์๊ธฐ์ ๋ณ์์ ๋ด์ง์๋๋ค.
int N = Integer.parseInt(st.nextToken());
if(N % H == 0) {
System.out.println((H * 100) + (N / H));
} else {
System.out.println(((N % H) * 100) + ((N / H) + 1));
}
}
}
}
/*
input
2
6 12 10
30 50 72
output
402
1203
*/