diff --git "a/khj20006/202508/30 BOJ P4 \353\266\200\353\252\250\353\213\230\352\273\230 \355\201\260\354\240\210 \355\225\230\352\263\240.md" "b/khj20006/202508/30 BOJ P4 \353\266\200\353\252\250\353\213\230\352\273\230 \355\201\260\354\240\210 \355\225\230\352\263\240.md" new file mode 100644 index 00000000..4a2e7ab7 --- /dev/null +++ "b/khj20006/202508/30 BOJ P4 \353\266\200\353\252\250\353\213\230\352\273\230 \355\201\260\354\240\210 \355\225\230\352\263\240.md" @@ -0,0 +1,121 @@ +```java +import java.util.*; +import java.io.*; + +class IOController { + BufferedReader br; + BufferedWriter bw; + StringTokenizer st; + + public IOController() { + br = new BufferedReader(new InputStreamReader(System.in)); + bw = new BufferedWriter(new OutputStreamWriter(System.out)); + st = new StringTokenizer(""); + } + + String nextLine() throws Exception { + String line = br.readLine(); + st = new StringTokenizer(line); + return line; + } + + String nextToken() throws Exception { + while (!st.hasMoreTokens()) nextLine(); + return st.nextToken(); + } + + int nextInt() throws Exception { + return Integer.parseInt(nextToken()); + } + + long nextLong() throws Exception { + return Long.parseLong(nextToken()); + } + + double nextDouble() throws Exception { + return Double.parseDouble(nextToken()); + } + + void close() throws Exception { + bw.flush(); + bw.close(); + } + + void write(String content) throws Exception { + bw.write(content); + } + +} + +public class Main { + + static IOController io; + + // + + static int N; + static int[] a; + + public static void main(String[] args) throws Exception { + + io = new IOController(); + + N = io.nextInt(); + a = new int[N]; + int min = Integer.MAX_VALUE; + for(int i=0;i list = new ArrayList<>(); + for(int i=2;i