Skip to content

Commit d52aac7

Browse files
authored
[20250317] BOJ / G5 / 2^3은? / 권혁준
1 parent 5151405 commit d52aac7

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
```java
2+
3+
import java.util.*;
4+
import java.io.*;
5+
6+
class Main {
7+
8+
// IO field
9+
static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
10+
static BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
11+
static StringTokenizer st = new StringTokenizer("");
12+
13+
static void nextLine() throws Exception {st = new StringTokenizer(br.readLine());}
14+
static int nextInt() throws Exception {
15+
if(!st.hasMoreTokens()) nextLine();
16+
return Integer.parseInt(st.nextToken());
17+
}
18+
static long nextLong() throws Exception {
19+
if(!st.hasMoreTokens()) nextLine();
20+
return Long.parseLong(st.nextToken());
21+
}
22+
static void bwEnd() throws Exception {bw.flush();bw.close();}
23+
24+
// Additional field
25+
26+
static int T, p, q, r;
27+
28+
public static void main(String[] args) throws Exception {
29+
30+
T = nextInt();
31+
while(T-->0) {
32+
33+
ready();
34+
solve();
35+
}
36+
37+
bwEnd();
38+
39+
}
40+
41+
static void ready() throws Exception{
42+
43+
p = nextInt();
44+
q = nextInt();
45+
r = nextInt();
46+
47+
}
48+
49+
static void solve() throws Exception{
50+
51+
bw.write((Math.min(q, r) + p - 1) + "\n");
52+
53+
}
54+
55+
}
56+
57+
```

0 commit comments

Comments
 (0)