diff --git "a/khj20006/202503/17 BOJ G5 2^3\354\235\200?.md" "b/khj20006/202503/17 BOJ G5 2^3\354\235\200?.md" new file mode 100644 index 00000000..fcca7e69 --- /dev/null +++ "b/khj20006/202503/17 BOJ G5 2^3\354\235\200?.md" @@ -0,0 +1,57 @@ +```java + +import java.util.*; +import java.io.*; + +class Main { + + // IO field + static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); + static BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); + static StringTokenizer st = new StringTokenizer(""); + + static void nextLine() throws Exception {st = new StringTokenizer(br.readLine());} + static int nextInt() throws Exception { + if(!st.hasMoreTokens()) nextLine(); + return Integer.parseInt(st.nextToken()); + } + static long nextLong() throws Exception { + if(!st.hasMoreTokens()) nextLine(); + return Long.parseLong(st.nextToken()); + } + static void bwEnd() throws Exception {bw.flush();bw.close();} + + // Additional field + + static int T, p, q, r; + + public static void main(String[] args) throws Exception { + + T = nextInt(); + while(T-->0) { + + ready(); + solve(); + } + + bwEnd(); + + } + + static void ready() throws Exception{ + + p = nextInt(); + q = nextInt(); + r = nextInt(); + + } + + static void solve() throws Exception{ + + bw.write((Math.min(q, r) + p - 1) + "\n"); + + } + +} + +```