From 7edbf17f7deae298aca25b9ca4b8c1711cd39b65 Mon Sep 17 00:00:00 2001 From: jaehyunii Date: Thu, 7 Jan 2021 23:26:22 +0900 Subject: [PATCH 1/7] =?UTF-8?q?[ADD]=20BOJ=20'no.10872'=20by.=EC=A0=95?= =?UTF-8?q?=EC=9E=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...\354\240\225\354\236\254\355\230\204.java" | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 "code/BOJ/no.10872/no.10872_\354\240\225\354\236\254\355\230\204.java" diff --git "a/code/BOJ/no.10872/no.10872_\354\240\225\354\236\254\355\230\204.java" "b/code/BOJ/no.10872/no.10872_\354\240\225\354\236\254\355\230\204.java" new file mode 100644 index 0000000..a650eac --- /dev/null +++ "b/code/BOJ/no.10872/no.10872_\354\240\225\354\236\254\355\230\204.java" @@ -0,0 +1,20 @@ +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.io.IOException; + +public class Main { + public static void main(String[] args) throws IOException { + BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); + int x = Integer.parseInt(br.readLine()); + + int sum = factorial(x); + System.out.println(sum); + + } + + public static int factorial(int x){ + if(x<=1) return 1; + + return x * factorial(x-1); + } +} \ No newline at end of file From 3756845766c392636fd6bd84dd4850e0f7344ff7 Mon Sep 17 00:00:00 2001 From: jaehyunii Date: Thu, 7 Jan 2021 23:34:08 +0900 Subject: [PATCH 2/7] =?UTF-8?q?[ADD]=20BOJ'no.10870'=20by.=EC=A0=95?= =?UTF-8?q?=EC=9E=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ..._\354\240\225\354\236\254\355\230\204.java" | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 "code/BOJ/no.10870/no.10870_\354\240\225\354\236\254\355\230\204.java" diff --git "a/code/BOJ/no.10870/no.10870_\354\240\225\354\236\254\355\230\204.java" "b/code/BOJ/no.10870/no.10870_\354\240\225\354\236\254\355\230\204.java" new file mode 100644 index 0000000..1e1004f --- /dev/null +++ "b/code/BOJ/no.10870/no.10870_\354\240\225\354\236\254\355\230\204.java" @@ -0,0 +1,18 @@ +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.io.IOException; + +public class Main{ + public static void main(String[] args) throws IOException { + + BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); + int n = Integer.parseInt(br.readLine()); + int result = Fibonacci(n); + System.out.println(result); + } + public static int Fibonacci(int n){ + if(n==0) return 0; + if(n==1) return 1; + return Fibonacci(n-1) + Fibonacci(n-2); + } +} From 4c9c78e5af3d1eae10d6941232c9ce5f63270c86 Mon Sep 17 00:00:00 2001 From: jaehyunii Date: Thu, 7 Jan 2021 23:35:22 +0900 Subject: [PATCH 3/7] =?UTF-8?q?[ADD]=20BOJ'no.11729'=20by.=EC=A0=95?= =?UTF-8?q?=EC=9E=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...\354\240\225\354\236\254\355\230\204.java" | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 "code/BOJ/no.11729/no.11729_\354\240\225\354\236\254\355\230\204.java" diff --git "a/code/BOJ/no.11729/no.11729_\354\240\225\354\236\254\355\230\204.java" "b/code/BOJ/no.11729/no.11729_\354\240\225\354\236\254\355\230\204.java" new file mode 100644 index 0000000..c557cf4 --- /dev/null +++ "b/code/BOJ/no.11729/no.11729_\354\240\225\354\236\254\355\230\204.java" @@ -0,0 +1,31 @@ +import java.util.Scanner; + +public class Main{ + + public static StringBuilder sb = new StringBuilder(); + + public static void main(String[] args) { + Scanner in = new Scanner(System.in); + int N = in.nextInt(); + + sb.append((int)(Math.pow(2,N)-1)).append('\n'); + + Hanoi(N,1,2,3); + System.out.println(sb); + } + + public static void Hanoi(int N, int start, int mid, int end){ + if(N==1){ + sb.append(start + " " + end + "\n"); + return; + } + //n-1개 start->mid + Hanoi(N-1, start, end, mid); + + //1개 start->end + Hanoi(1, start, mid, end); + + //n-1개 mid->end + Hanoi(N-1, mid, start, end); + } +} \ No newline at end of file From d3c41801b9f4920544d6572253eedbaa4bf33751 Mon Sep 17 00:00:00 2001 From: jaehyunii Date: Thu, 7 Jan 2021 23:38:20 +0900 Subject: [PATCH 4/7] =?UTF-8?q?[ADD]=20BOJ'no.10870'=20by.=EC=A0=95?= =?UTF-8?q?=EC=9E=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...\354\240\225\354\236\254\355\230\204.java" | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 "code/BOJ/no.2447/no.2447_\354\240\225\354\236\254\355\230\204.java" diff --git "a/code/BOJ/no.2447/no.2447_\354\240\225\354\236\254\355\230\204.java" "b/code/BOJ/no.2447/no.2447_\354\240\225\354\236\254\355\230\204.java" new file mode 100644 index 0000000..ac4d1e9 --- /dev/null +++ "b/code/BOJ/no.2447/no.2447_\354\240\225\354\236\254\355\230\204.java" @@ -0,0 +1,51 @@ +import java.util.Scanner; + +public class Main { + static char[][] arr; + + public static void main(String[] args) { + Scanner in = new Scanner (System.in); + int N = in.nextInt(); + + arr = new char[N][N]; + + star(0,0,N,false); + + StringBuilder sb = new StringBuilder(); + for(int i = 0; i Date: Thu, 7 Jan 2021 23:41:18 +0900 Subject: [PATCH 5/7] =?UTF-8?q?[ADD]=20BOJ'no.10870'=20by.=EC=A0=95?= =?UTF-8?q?=EC=9E=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../no.2447/no.2447_\354\240\225\354\236\254\355\230\204.java" | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git "a/code/BOJ/no.2447/no.2447_\354\240\225\354\236\254\355\230\204.java" "b/code/BOJ/no.2447/no.2447_\354\240\225\354\236\254\355\230\204.java" index ac4d1e9..f0f04fb 100644 --- "a/code/BOJ/no.2447/no.2447_\354\240\225\354\236\254\355\230\204.java" +++ "b/code/BOJ/no.2447/no.2447_\354\240\225\354\236\254\355\230\204.java" @@ -48,4 +48,4 @@ static void star(int x, int y, int N, boolean blank) { } } } -} \ No newline at end of file +} From 93bdec594d43504ad500e7e644a2b4fd8ef16f7e Mon Sep 17 00:00:00 2001 From: jaehyunii Date: Thu, 7 Jan 2021 23:43:40 +0900 Subject: [PATCH 6/7] =?UTF-8?q?[DEL]=20BOJ'no.11729'=20by.=EC=A0=95?= =?UTF-8?q?=EC=9E=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...\354\240\225\354\236\254\355\230\204.java" | 51 ------------------- 1 file changed, 51 deletions(-) delete mode 100644 "code/BOJ/no.2447/no.2447_\354\240\225\354\236\254\355\230\204.java" diff --git "a/code/BOJ/no.2447/no.2447_\354\240\225\354\236\254\355\230\204.java" "b/code/BOJ/no.2447/no.2447_\354\240\225\354\236\254\355\230\204.java" deleted file mode 100644 index f0f04fb..0000000 --- "a/code/BOJ/no.2447/no.2447_\354\240\225\354\236\254\355\230\204.java" +++ /dev/null @@ -1,51 +0,0 @@ -import java.util.Scanner; - -public class Main { - static char[][] arr; - - public static void main(String[] args) { - Scanner in = new Scanner (System.in); - int N = in.nextInt(); - - arr = new char[N][N]; - - star(0,0,N,false); - - StringBuilder sb = new StringBuilder(); - for(int i = 0; i Date: Thu, 7 Jan 2021 23:44:08 +0900 Subject: [PATCH 7/7] =?UTF-8?q?[ADD]=20BOJ=20'no.2447'=20by.=EC=A0=95?= =?UTF-8?q?=EC=9E=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...\354\240\225\354\236\254\355\230\204.java" | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 "code/BOJ/no.2447/no.2447_\354\240\225\354\236\254\355\230\204.java" diff --git "a/code/BOJ/no.2447/no.2447_\354\240\225\354\236\254\355\230\204.java" "b/code/BOJ/no.2447/no.2447_\354\240\225\354\236\254\355\230\204.java" new file mode 100644 index 0000000..f0f04fb --- /dev/null +++ "b/code/BOJ/no.2447/no.2447_\354\240\225\354\236\254\355\230\204.java" @@ -0,0 +1,51 @@ +import java.util.Scanner; + +public class Main { + static char[][] arr; + + public static void main(String[] args) { + Scanner in = new Scanner (System.in); + int N = in.nextInt(); + + arr = new char[N][N]; + + star(0,0,N,false); + + StringBuilder sb = new StringBuilder(); + for(int i = 0; i