From aeff0fff0a7b82d19f6433bcc3554443f3c9c3e7 Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Wed, 10 Jul 2024 23:43:33 +0900 Subject: [PATCH 01/70] =?UTF-8?q?30700=EB=B2=88=20-=20KOREA=20=EB=AC=B8?= =?UTF-8?q?=EC=9E=90=EC=97=B4=20=EB=A7=8C=EB=93=A4=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/30700.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 202402715/30700.java diff --git a/202402715/30700.java b/202402715/30700.java new file mode 100644 index 0000000..d5d81b0 --- /dev/null +++ b/202402715/30700.java @@ -0,0 +1,22 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + String in = sc.next(); + char[] k = {'K', 'O','R', 'E', 'A'}; + int j = 0; + int count = 0; + for(int i = 0; i Date: Thu, 11 Jul 2024 00:11:15 +0900 Subject: [PATCH 02/70] =?UTF-8?q?14724=EB=B2=88=20-=20=EA=B4=80=EB=A6=AC?= =?UTF-8?q?=EC=9E=90=EB=8A=94=20=EB=88=84=EA=B5=AC=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/14724.java | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 202402715/14724.java diff --git a/202402715/14724.java b/202402715/14724.java new file mode 100644 index 0000000..d2acb81 --- /dev/null +++ b/202402715/14724.java @@ -0,0 +1,27 @@ +import java.util.Arrays; +import java.util.Scanner; +public class Main{ + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + int a = sc.nextInt(); + int[] m = new int[9]; + int[] n = new int[9]; + int[] k = new int[a]; + String[] q = {"PROBRAIN", "GROW", "ARGOS", "ADMIN", "ANT", "MOTION", "SPG", "COMON", "ALMIGHTY"}; + for(int i = 0; i<9; i++) { + for(int j = 0; j Date: Thu, 11 Jul 2024 00:12:09 +0900 Subject: [PATCH 03/70] =?UTF-8?q?13416=EB=B2=88=20-=20=EC=A3=BC=EC=8B=9D?= =?UTF-8?q?=20=ED=88=AC=EC=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/13416.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 202402715/13416.java diff --git a/202402715/13416.java b/202402715/13416.java new file mode 100644 index 0000000..71ddd1f --- /dev/null +++ b/202402715/13416.java @@ -0,0 +1,20 @@ +import java.util.Arrays; +import java.util.Scanner; +public class Main{ + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + int a = sc.nextInt(); + for(int i = 0; i0) { + sum = sum + v[2]; + } + } + System.out.println(sum); + } + } +} \ No newline at end of file From d76713b26d1e4596da0d0fb448848c088088ddec Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Thu, 11 Jul 2024 00:12:48 +0900 Subject: [PATCH 04/70] =?UTF-8?q?5523=EB=B2=88=20-=20=EA=B2=BD=EA=B8=B0=20?= =?UTF-8?q?=EA=B2=B0=EA=B3=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/5523.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 202402715/5523.java diff --git a/202402715/5523.java b/202402715/5523.java new file mode 100644 index 0000000..c36c284 --- /dev/null +++ b/202402715/5523.java @@ -0,0 +1,19 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + int a = sc.nextInt(); + int A = 0; + int B = 0; + for(int i = 0; ic) { + A++; + }else if(c>b) { + B++; + } + } + System.out.printf("%d %d", A, B); + } +} \ No newline at end of file From 28ed394495aa92812eb4dd8051c7c98acc85861f Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Thu, 11 Jul 2024 00:13:56 +0900 Subject: [PATCH 05/70] =?UTF-8?q?31668=EB=B2=88=20-=20=ED=8A=B9=EB=B3=84?= =?UTF-8?q?=ED=95=9C=20=EA=B0=80=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/31668.java | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 202402715/31668.java diff --git a/202402715/31668.java b/202402715/31668.java new file mode 100644 index 0000000..a3afc39 --- /dev/null +++ b/202402715/31668.java @@ -0,0 +1,11 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + int a = sc.nextInt(); + int b = sc.nextInt(); + int c = sc.nextInt(); + + System.out.println(b/a*c); + } +} \ No newline at end of file From f84871e96b32d11f8cd6d76a6bedd62c62e605d7 Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Thu, 11 Jul 2024 00:15:14 +0900 Subject: [PATCH 06/70] =?UTF-8?q?28074=EB=B2=88=20-=20=EB=AA=A8=EB=B9=84?= =?UTF-8?q?=EC=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/28074.java | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 202402715/28074.java diff --git a/202402715/28074.java b/202402715/28074.java new file mode 100644 index 0000000..b743670 --- /dev/null +++ b/202402715/28074.java @@ -0,0 +1,30 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + String k = sc.next(); + int a = k.length(); + boolean m = false; + boolean o = false; + boolean b = false; + boolean i = false; + boolean s = false; + boolean out = true; + + for(int d = 0; d Date: Thu, 11 Jul 2024 00:17:05 +0900 Subject: [PATCH 07/70] =?UTF-8?q?16486=EB=B2=88=20-=20=EC=9A=B4=EB=8F=99?= =?UTF-8?q?=EC=9E=A5=20=ED=95=9C=20=EB=B0=94=ED=80=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/16486.java | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 202402715/16486.java diff --git a/202402715/16486.java b/202402715/16486.java new file mode 100644 index 0000000..ba30c9d --- /dev/null +++ b/202402715/16486.java @@ -0,0 +1,9 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int d1 = sc.nextInt(); + int d2 = sc.nextInt(); + System.out.print(2*d1 + 3.141592*d2*2); + } +} \ No newline at end of file From 026faaed8220fe9fc6ca91dc91b3a892b195a9a6 Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Thu, 11 Jul 2024 00:17:50 +0900 Subject: [PATCH 08/70] =?UTF-8?q?15740=EB=B2=88=20-=20A=20+=20B=20-=209?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/15740.java | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 202402715/15740.java diff --git a/202402715/15740.java b/202402715/15740.java new file mode 100644 index 0000000..3ea8de0 --- /dev/null +++ b/202402715/15740.java @@ -0,0 +1,11 @@ +import java.math.*; +import java.util.*; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + BigInteger a = sc.nextBigInteger(); + BigInteger b = sc.nextBigInteger(); + + System.out.print(a.add(b)); + } +} \ No newline at end of file From b59bdaf0ea1380af0af79fb75bee766d2c6934b4 Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Thu, 11 Jul 2024 00:18:27 +0900 Subject: [PATCH 09/70] =?UTF-8?q?31403=EB=B2=88=20-=20A=20+=20B=20-=20C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/31403.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 202402715/31403.java diff --git a/202402715/31403.java b/202402715/31403.java new file mode 100644 index 0000000..ee4ae2c --- /dev/null +++ b/202402715/31403.java @@ -0,0 +1,14 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int a = sc.nextInt(); + int b = sc.nextInt(); + int c = sc.nextInt(); + String k = Integer.toString(a); + k = k + b; + int d = Integer.parseInt(k); + System.out.println(a+b-c); + System.out.print(d-c); + } +} \ No newline at end of file From c439459f9d80b3a289c39b396c49edb7982800c9 Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Thu, 11 Jul 2024 00:20:14 +0900 Subject: [PATCH 10/70] =?UTF-8?q?16675=EB=B2=88=20-=20=EB=91=90=20?= =?UTF-8?q?=EA=B0=9C=EC=9D=98=20=EC=86=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/16675.java | 76 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 202402715/16675.java diff --git a/202402715/16675.java b/202402715/16675.java new file mode 100644 index 0000000..7196d11 --- /dev/null +++ b/202402715/16675.java @@ -0,0 +1,76 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + String m1 = sc.next(); + String m2 = sc.next(); + String t1 = sc.next(); + String t2 = sc.next(); + String m; + String t; + if(m1.equals(m2)){ + m = m1; + switch(m){ + case("R"): + if(t1.equals("P") || t2.equals("P")){ + System.out.print("TK"); + }else if(t1.equals("S") && t2.equals("S")){ + System.out.print("MS"); + }else{ + System.out.print("?"); + }break; + + case("P"): + if(t1.equals("S") || t2.equals("S")){ + System.out.print("TK"); + }else if(t1.equals("R") && t2.equals("R")){ + System.out.print("MS"); + }else{ + System.out.print("?"); + }break; + + case("S"): + if(t1.equals("R") || t2.equals("R")){ + System.out.print("TK"); + }else if(t1.equals("P") && t2.equals("P")){ + System.out.print("MS"); + }else{ + System.out.print("?"); + }break; + } + + }else if(t1.equals(t2)){ + t = t1; + switch(t){ + case("R"): + if(m1.equals("P") || m2.equals("P")){ + System.out.print("MS"); + }else if(m1.equals("S") && m2.equals("S")){ + System.out.print("TK"); + }else{ + System.out.print("?"); + }break; + + case("P"): + if(m1.equals("S") || m2.equals("S")){ + System.out.print("MS"); + }else if(m1.equals("R") && m2.equals("R")){ + System.out.print("TK"); + }else{ + System.out.print("?"); + }break; + + case("S"): + if(m1.equals("R") || m2.equals("R")){ + System.out.print("MS"); + }else if(m1.equals("P") && m2.equals("P")){ + System.out.print("TK"); + }else{ + System.out.print("?"); + }break; + } + }else{ + System.out.print("?"); + } + } +} \ No newline at end of file From 62a454d15c4dbd0dc897e723678d7211630c705f Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Thu, 11 Jul 2024 00:22:11 +0900 Subject: [PATCH 11/70] =?UTF-8?q?4892=EB=B2=88=20-=20=EC=88=AB=EC=9E=90=20?= =?UTF-8?q?=EB=A7=9E=EC=B6=94=EA=B8=B0=20=EA=B2=8C=EC=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/4892.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 202402715/4892.java diff --git a/202402715/4892.java b/202402715/4892.java new file mode 100644 index 0000000..b4c590c --- /dev/null +++ b/202402715/4892.java @@ -0,0 +1,21 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int k = 1; + while(true){ + int n0 = sc.nextInt(); + if(n0==0){ + break; + } + int n1 = n0*3; + if(n1%2==0){ + System.out.printf("%d. %s %d\n", k, "even", n0/2); + k++; + }else{ + System.out.printf("%d. %s %d\n", k, "odd", (n0-1)/2); + k++; + } + } + } +} \ No newline at end of file From 85e1d82cc49b96b582d15c8374d1291decde265e Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Thu, 11 Jul 2024 00:39:36 +0900 Subject: [PATCH 12/70] =?UTF-8?q?5988=EB=B2=88=20-=20=ED=99=80=EC=88=98?= =?UTF-8?q?=EC=9D=BC=EA=B9=8C=20=EC=A7=9D=EC=88=98=EC=9D=BC=EA=B9=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/5988.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 202402715/5988.java diff --git a/202402715/5988.java b/202402715/5988.java new file mode 100644 index 0000000..b613b7c --- /dev/null +++ b/202402715/5988.java @@ -0,0 +1,20 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int a = sc.nextInt(); + for(int i = 0; i Date: Thu, 11 Jul 2024 00:40:47 +0900 Subject: [PATCH 13/70] =?UTF-8?q?28290=EB=B2=88=20-=20=EC=95=88=EB=B0=96?= =?UTF-8?q?=3F=20=EB=B0=96=EC=95=88=3F=20=EA=B3=84=EB=8B=A8=3F=20=EC=97=AD?= =?UTF-8?q?=EA=B3=84=EB=8B=A8=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/28290.java | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 202402715/28290.java diff --git a/202402715/28290.java b/202402715/28290.java new file mode 100644 index 0000000..8f033c4 --- /dev/null +++ b/202402715/28290.java @@ -0,0 +1,27 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + String in = sc.next(); + switch(in){ + case("fdsajkl;"): case("jkl;fdsa"): + System.out.print("in-out"); + break; + + case("asdf;lkj"): case(";lkjasdf"): + System.out.print("out-in"); + break; + + case("asdfjkl;"): + System.out.print("stairs"); + break; + + case(";lkjfdsa"): + System.out.print("reverse"); + break; + + default: + System.out.print("molu"); + } + } +} \ No newline at end of file From dd44eca34eb566c26af7afbdb065d7e2f71ef12c Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Thu, 11 Jul 2024 00:41:33 +0900 Subject: [PATCH 14/70] =?UTF-8?q?25640=EB=B2=88=20-=20MBTI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/25640.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 202402715/25640.java diff --git a/202402715/25640.java b/202402715/25640.java new file mode 100644 index 0000000..363b0c0 --- /dev/null +++ b/202402715/25640.java @@ -0,0 +1,16 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + String in = sc.next(); + int a = sc.nextInt(); + int cnt = 0; + for(int i = 0; i Date: Thu, 11 Jul 2024 00:42:19 +0900 Subject: [PATCH 15/70] =?UTF-8?q?27959=EB=B2=88=20-=20=EC=B4=88=EC=BD=94?= =?UTF-8?q?=EB=B0=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/27959.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 202402715/27959.java diff --git a/202402715/27959.java b/202402715/27959.java new file mode 100644 index 0000000..ef7b0ae --- /dev/null +++ b/202402715/27959.java @@ -0,0 +1,15 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int N = sc.nextInt(); + int M = sc.nextInt(); + + N = N*100; + if(N>=M){ + System.out.print("Yes"); + }else{ + System.out.print("No"); + } + } +} \ No newline at end of file From 8227dd27f4dd9a5830798fc4517a5c1a8a80a985 Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Thu, 11 Jul 2024 00:43:01 +0900 Subject: [PATCH 16/70] =?UTF-8?q?27294=EB=B2=88=20-=20=EB=AA=87=EA=B0=9C?= =?UTF-8?q?=EA=B3=A0=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/27294.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 202402715/27294.java diff --git a/202402715/27294.java b/202402715/27294.java new file mode 100644 index 0000000..a05b3ea --- /dev/null +++ b/202402715/27294.java @@ -0,0 +1,13 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int a = sc.nextInt(); + int b = sc.nextInt(); + if(11 Date: Sun, 21 Jul 2024 03:34:21 +0900 Subject: [PATCH 17/70] =?UTF-8?q?10699=EB=B2=88=20-=20=EC=98=A4=EB=8A=98?= =?UTF-8?q?=20=EB=82=A0=EC=A7=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/10699.java | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 202402715/10699.java diff --git a/202402715/10699.java b/202402715/10699.java new file mode 100644 index 0000000..fb518ef --- /dev/null +++ b/202402715/10699.java @@ -0,0 +1,6 @@ +public class Main{ + public static void main(String[] args){ + System.out.print("2024-07-11"); + + } +} \ No newline at end of file From 6a1af44b7618c1d5e6a5f23b7af92e7ec826b272 Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Sun, 21 Jul 2024 03:36:25 +0900 Subject: [PATCH 18/70] =?UTF-8?q?2738=EB=B2=88=20-=20=ED=96=89=EB=A0=AC=20?= =?UTF-8?q?=EB=8D=A7=EC=85=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/2738.java | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 202402715/2738.java diff --git a/202402715/2738.java b/202402715/2738.java new file mode 100644 index 0000000..e5af53f --- /dev/null +++ b/202402715/2738.java @@ -0,0 +1,39 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int x = sc.nextInt(); + int y = sc.nextInt(); + + int[][] v1 = new int[x][y]; + for(int i = 0; i Date: Sun, 21 Jul 2024 03:36:52 +0900 Subject: [PATCH 19/70] =?UTF-8?q?4153=EB=B2=88=20-=20=EC=A7=81=EA=B0=81?= =?UTF-8?q?=EC=82=BC=EA=B0=81=ED=98=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/4153.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 202402715/4153.java diff --git a/202402715/4153.java b/202402715/4153.java new file mode 100644 index 0000000..0df1ca2 --- /dev/null +++ b/202402715/4153.java @@ -0,0 +1,22 @@ +import java.util.*; + +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + while(true){ + int[] a = {sc.nextInt(), sc.nextInt(), sc.nextInt()}; + if(a[1]==0){ + break; + } + Arrays.sort(a); + for(int i = 0; i<3;i++){ + a[i] = a[i]*a[i]; + } + if(a[2]==a[1]+a[0]){ + System.out.println("right"); + }else{ + System.out.println("wrong"); + } + } + } +} \ No newline at end of file From c3a79d12c62199c86f7d9e16c55df05a18b94526 Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Sun, 21 Jul 2024 03:37:21 +0900 Subject: [PATCH 20/70] =?UTF-8?q?30802=EB=B2=88=20-=20=EC=9B=B0=EC=BB=B4?= =?UTF-8?q?=20=ED=82=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/30802.java | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 202402715/30802.java diff --git a/202402715/30802.java b/202402715/30802.java new file mode 100644 index 0000000..4fc5b93 --- /dev/null +++ b/202402715/30802.java @@ -0,0 +1,42 @@ +import java.util.*; + +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int num = sc.nextInt(); + int[] in = new int[6]; + int count = 0; + int a = 1; + int k = 0; + for(int i = 0; i<6;i++){ + in[i] = sc.nextInt(); + } + + int T = sc.nextInt(); + int P = sc.nextInt(); + Arrays.sort(in); + + while(true){ + if(in[k]<=T*a){ +// System.out.printf("in[%d] %d\n",k, in[k]); + if(in[k]==0){ + count--; + } + count++; + k++; +// System.out.printf("count %d\n",count); +// System.out.printf("k %d\n",k); + a=1; + }else{ + a++; + count++; +// System.out.printf("a %d\n",a); + } + if(k==6){ + break; + } + } + System.out.println(count); + System.out.printf("%d %d", num/P, num%P); + } +} \ No newline at end of file From f96c1c313dbfa0446eadb92bdef271ea151b4cbe Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Sun, 21 Jul 2024 03:38:26 +0900 Subject: [PATCH 21/70] =?UTF-8?q?15963=EB=B2=88=20-=20CASIO?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/15963.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 202402715/15963.java diff --git a/202402715/15963.java b/202402715/15963.java new file mode 100644 index 0000000..4d06364 --- /dev/null +++ b/202402715/15963.java @@ -0,0 +1,13 @@ +import java.util.*; +public class Main{ + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + long a = sc.nextLong(); + long b = sc.nextLong(); + if(a==b) { + System.out.print("1"); + }else { + System.out.print("0"); + } + } +} \ No newline at end of file From 02b6a03bed22525d372723595fa57baa696f00d0 Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Sun, 21 Jul 2024 03:39:04 +0900 Subject: [PATCH 22/70] =?UTF-8?q?24900=EB=B2=88=20-=20=ED=95=9C=EB=B3=84?= =?UTF-8?q?=20=EC=B0=8D=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/24900.java | 69 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 202402715/24900.java diff --git a/202402715/24900.java b/202402715/24900.java new file mode 100644 index 0000000..bf28e43 --- /dev/null +++ b/202402715/24900.java @@ -0,0 +1,69 @@ +import java.util.*; +public class Main{ + public static void main(String[] args){ + System.out.println(" :8DDDDDDDDDDDDDD$. \n"+ +" DDDNNN8~~~~~~~~~~=~7DNNDNDDDNNI \n"+ +" ?NNDD=~=~~~~~~~~~~~~~~~~~=~~==~=INNDNN7 \n"+ +" +NDDI~~~~~~~~~~~~~~~~~~~~~~~=~~========~ODND+ \n"+ +" :NND~~~~~~~~~~~~~~~~~~~~~~~~~~~=~~============7NDN \n"+ +" $DD$~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=~~==============~DNN \n"+ +" $DD=~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=~~=================NND \n"+ +" ND7~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=~~===================DD7 \n"+ +" ~DD=~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=======================8DN. \n"+ +" 8DO~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=========================DD \n"+ +" 8N~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=~~=======================DN \n"+ +" NN::::::::~~~~~~~~~~~=~~~~~~~~~~~~~~~~~~~=~~========================DDO \n"+ +" $D$:::::::::::::::~~~~DD~~~~~~~~~~~~~~~~~~=~~=========================DN. \n"+ +" D8:::::::::::::::::::DN=::~~~~~~~~~~~~~~~~=~~======================~~:~DN \n"+ +" DN:::::::::::::::::::ONO::::::::::::::::::::~~~~~~~~~~~~:::::::::::::::::DN \n"+ +" DN::::::::::::::::::::NN.:::::::::::::::::::::::::::DN::::::::::::::::::::$DO \n"+ +" DD:::::::::::::::::::DNI:::::::::::::::::::::::::::::D=::::::::::::::::::::NN \n"+ +" NN~~~~:::::$N?:::::::.NN::::::::::::::::::::::::::::::ND.:::::::::::::::::::+N8 \n"+ +" N7~~~~~~~~OD7::::::::~DD::::::::::::::::::::::::::::::~D$::::::::::::::::::::DN \n"+ +" NN~~~~~~~~IDZ~~~~~::::DN~:::::::::::::::::::::::::::::::DN::::::::::::::::::::=N~ \n"+ +" DD~~~~~~~~NN~~~~~~~~~=NN::::::::::::::::::::::::::::::::DN:::::::::::::::~~====NN \n"+ +" 8D~~~~~~~~ND~~~~~~~~~~~ND~~~~~~~~:::::::::::::::::::::::::N7:::~~===============NN \n"+ +" DD~~~~~~~ON+~~~~~~~~~~~ND~~~~~~~~~~~~~~~~~~~=+NZ==========NN====================~ND \n"+ +" :DD7 DNDD. N8~~~~~~~NN~~~~~~~~~~DDND~~~~~~~~~~~~~~~~~~~~ND~~=========DD=====================ND \n"+ +" N~:DDNNN .8NDN~~~~~~~$D=~~~~~~~~+ND.DD~~~~~~~~~~~~~~~~~~~=DD~~=========~D+====================DN \n"+ +" :D . ..~ND~~~~~~~NN~~~~~~~+NN$..ND~~~~~~~~~~~~~~~~~~~7N=~~=========~ND=======~============ON \n"+ +" NN ...:N?~~~~~~~N=~~~~~NNNI.. .7D+~~~~~~~~~~~~~~~~~=8NN~~==========NN=======N============$N \n"+ +" N ODN ....DN~~~~~~~DD=8NNND$.. .DD~~~=~~~~~~~~~~~~~=NNDD=~=========8D~======NN===========~N$ \n"+ +" N? =NN ND .....NND~~~~~~~DDNN:... .ND=~DNN~~~~~~~~~~~~=DN.DN~=========?N+======NN============ND \n"+ +" $D? DN DZ ....ND8NN~~~~~~$D .DD~NNDD~~~~~~~~~~~~D8..DN=========~DN======NN============DN \n"+ +" DN ~N~ NN ..:~NN..NZ~~~~~~DN NNN8.ND~~~~NDN?~~~DZ...7DD=======~NN======NN============DN \n"+ +" ND DD :DN. ..ND$ .N?~~~~~=NNN . ..DDD$~N8OND8=N+ ..DDDZ~====NN======+D+===========ND \n"+ +" NO DD ZDN 8NO~~~~~~NNN..DDDNN7 ...NND...:DDD: .:.NDND=~DD======~DO===========DN \n"+ +" DNDDN:. DN~~~~~~=NNNN.ODNNNNDDNNO ... . ...DNNNN=======ND===========DD \n"+ +" INDN7 DD. .DD~~~~~=IDND:.:~.....?DNDNN. ...... ....$D=======ND===========ND \n"+ +" NN ND. 8N=~~~~$ND::.:=~:.~=......=ND~ .NNNNNNNNNNNNNNN.~N+======NN===========DN \n"+ +" $DD DN: DD~~~~7NO...~==.:~~:..... NNNND? ..::..7NZ.:N?======8D~==========ZN \n"+ +" DN? ~D: DND.?D~~~~~DD....~:.~=~....... ....~=:.:~..ND======~N$==========~DO \n"+ +" ND ..DD. .DNDN=~~~~DI.......:......... ....=~..~~~..DN======~DD===========NN \n"+ +" DDD :.:DD. . DDI~~~~~ND................ .DNNNNNNNNNN7 ....=~:.:~~...NN=======ND===========?D~ \n"+ +" 8D. ...OD.. DD~~~~~~+ND ............ NN:~::::~~~8N ........~~...:ND=======DN============NN \n"+ +" DDI:...ND .D7~~~~~~~7NN .......... ID8::::::::8D .............:DN=======ON============NN \n"+ +" ~NNND.N=. .NN~~~~~~~~~NDN8 ~::::::~N8 .............DN========D=============NI \n"+ +" DDNNN.ND~~~~~~~~DD =DND ............DN========N+~===========NN \n"+ +" ~:N=~~~~~~~~DD .DDDD ........ NN========DD============8D \n"+ +" 8N~~~~~~~~~ND . .7NDDD? . .8DDN========NN=============D: \n"+ +" DD~~~~~~~~~DND: IDNNND$. .+DNNNNDNIDN========DD=============DD \n"+ +" ND~~~~~~~~ZN 7DD .. .:DDNDDNNDNNNNDDNDND8$?===+$8DDNNNDDDDDN8I~DN====8N========NN=============NN \n"+ +" DD~~~~~~~~8N DD. .NN~~~~.~~=DNDNO.:7ODDDDNNDD8DDDND=~~~ =~~~ON====8N========DN=============DN \n"+ +" ND~~~~~~~~DN ZDD DN~~~ ~~~~~=.7DDD+.......8NNN==~~~~~ ~~~~~ONN$==DN========8N=============ON \n"+ +" ND~8N~=~~~ZN DDODN=~.~~~~~=.~~~~INDNNNNDNN~~~~~~~~:~~~~~~~DN~ND=DN========DD=========~ND=8N \n"+ +" IN=NDDI~~~~D8 DNN::~~~~~.~~~~~=.~~ND~~ND~~~~~~~~.~~~~~~~~NN NDNN====ND==ND~D?======DNN=ND \n"+ +" DNNI8ND=~~DN: ZN=~~~~~ ~~~~~.~~~~DD~=DD~~~~~~~ ~~~~~~~=.ND. . ND===DNDD=NDDNN=====8NZDDDN \n"+ +" NND IDNDNNN+ D+~~~:~~~~~~ ~~~~~DDNNN+~~~~~~~~~~~~~~:=?N7 .ND=~ND DNNN~ID====ND7 NNN \n"+ +" ID ND~~ ~~~~~:.~~~7DDN7IDNN==~~ ~~~~~~~~ ~~DN .:N?DDDDD NND 8N~=DDD ZNN \n"+ +" NN~:~~~~~ =7DDDD+8N :N8DDZ.~~~~~~~~.~~~DD. NDD+ . DN= OND+ \n"+ +" DND~~~=8DNDDZ=~~ ND NN~INND~~~~~.~~~~ND . . ..IDD \n"+ +" DDNNNDNNN+~~~~~~.7N. ND~~~NDDI~ ~~~~=NNN .DDI \n"+ +" DN=~~~~.=~~~~~~ ~~DN +N+~~~~+DNDD~~~NNNND. ..ND \n"+ +" DDI~~ ~~~~~~~ ~~~ND.. ..ND~~~~:~~~DNDNNNN+ ..7O8ND+ \n"+ +" .DND=~~~~=::~~=NN. . . 8D~~.~~~~~~=DN$ODNDNDNNNDNNNNND8+~.. \n"+ +" 8DNNI=.~~~~=NDDNNNNDDNDNN.~~~~~IDDNDND7:. \n"+ +" ?DNNDD?~DD ~NN~~=NDD$ \n"+ +" :DDD. NNNN= "); + } +} \ No newline at end of file From 21a04615d34016e82800307c85f1c330a3bc27ec Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Sun, 21 Jul 2024 03:39:50 +0900 Subject: [PATCH 23/70] =?UTF-8?q?30676=EB=B2=88=20-=20=EC=9D=B4=20?= =?UTF-8?q?=EB=B3=84=EC=9D=80=20=EB=AC=B4=EC=8A=A8=20=EC=83=89=EC=9D=BC?= =?UTF-8?q?=EA=B9=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/30676.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 202402715/30676.java diff --git a/202402715/30676.java b/202402715/30676.java new file mode 100644 index 0000000..a640a02 --- /dev/null +++ b/202402715/30676.java @@ -0,0 +1,22 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + int in = sc.nextInt(); + if(620<=in && in<=780) { + System.out.print("Red"); + }else if(590<=in && in<620) { + System.out.print("Orange"); + }else if(570<=in && in<590) { + System.out.print("Yellow"); + }else if(495<=in && in<570) { + System.out.print("Green"); + }else if(450<=in && in<495) { + System.out.print("Blue"); + }else if(425<=in && in<450) { + System.out.print("Indigo"); + }else if(380<=in && in<425) { + System.out.print("Violet"); + } + } +} \ No newline at end of file From c0e66fc7a4a8ee51726c079a0e330825ed20c6a9 Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Sun, 21 Jul 2024 03:40:28 +0900 Subject: [PATCH 24/70] =?UTF-8?q?3034=EB=B2=88=20-=20=EC=95=B5=EA=B7=B8?= =?UTF-8?q?=EB=A6=AC=20=EC=B0=BD=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/3034.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 202402715/3034.java diff --git a/202402715/3034.java b/202402715/3034.java new file mode 100644 index 0000000..30754ce --- /dev/null +++ b/202402715/3034.java @@ -0,0 +1,19 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + int a = sc.nextInt(); + int b = sc.nextInt(); + b = b*b; + int c = sc.nextInt(); + c = c*c; + for(int i = 0; i Date: Sun, 21 Jul 2024 03:40:57 +0900 Subject: [PATCH 25/70] =?UTF-8?q?11966=EB=B2=88=20-=202=EC=9D=98=20?= =?UTF-8?q?=EC=A0=9C=EA=B3=B1=EC=9D=B8=EA=B0=80=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/11966.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 202402715/11966.java diff --git a/202402715/11966.java b/202402715/11966.java new file mode 100644 index 0000000..209dad7 --- /dev/null +++ b/202402715/11966.java @@ -0,0 +1,19 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + int in = sc.nextInt(); + while(true) { + if(in==1) { + System.out.print("1"); + break; + } + if(in%2==1) { + System.out.print("0"); + break; + }else { + in = in/2; + } + } + } +} \ No newline at end of file From 7915363acd27d49f67254a7b3cf745376bd92dd0 Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Sun, 21 Jul 2024 03:41:33 +0900 Subject: [PATCH 26/70] =?UTF-8?q?29752=EB=B2=88=20-=20=EC=B5=9C=EC=9E=A5?= =?UTF-8?q?=20=EC=8A=A4=ED=8A=B8=EB=A6=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/29752.java | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 202402715/29752.java diff --git a/202402715/29752.java b/202402715/29752.java new file mode 100644 index 0000000..60b423e --- /dev/null +++ b/202402715/29752.java @@ -0,0 +1,35 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + int in = sc.nextInt(); + int count = 0; + int tem = 0; + int mark = 0; + int[] a = new int[in]; + for(int i = 0; i < in; i++) { + a[i]=sc.nextInt(); + } + + for(int i = 0; i < in; i++) { + if(a[i]!= 0) { + tem++; + if(tem>count) { + count = tem; + } + }else { + if(tem>count) { + count = tem; + } + tem = 0; + mark = 1; + } + } + + if(mark == 1) { + System.out.print(count); + }else { + System.out.print(tem); + } + } +} \ No newline at end of file From 3631ff961874e4f1186b245209118b62b2d866e0 Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Sun, 21 Jul 2024 03:42:08 +0900 Subject: [PATCH 27/70] =?UTF-8?q?18238=EB=B2=88=20-=20ZOAC=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/18238.java | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 202402715/18238.java diff --git a/202402715/18238.java b/202402715/18238.java new file mode 100644 index 0000000..d4665d9 --- /dev/null +++ b/202402715/18238.java @@ -0,0 +1,28 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + String in = sc.next(); + int count = in.charAt(0)-'A'; + if(count > 13) { + count = 26 - count; + } + + int ln = in.length(); + for(int i = 0; i < ln-1; i++) { + int a = in.charAt(i)-in.charAt(i+1); + if(a > 13) { + a = 26 - a; + }else if(a<-13) { + a = a + 26; + } + if(a<0) { + a = a*(-1); + } + +// System.out.println(a); + count = count + a; + } + System.out.print(count); + } +} \ No newline at end of file From bd7e10a75866d8079c9d99b5f7c7f3023c6f78d1 Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Sat, 3 Aug 2024 18:07:35 +0900 Subject: [PATCH 28/70] =?UTF-8?q?9653=EB=B2=88=20-=20=EC=8A=A4=ED=83=80?= =?UTF-8?q?=EC=9B=8C=EC=A6=88=20=EB=A1=9C=EA=B3=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/9653.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 202402715/9653.java diff --git a/202402715/9653.java b/202402715/9653.java new file mode 100644 index 0000000..d7fede3 --- /dev/null +++ b/202402715/9653.java @@ -0,0 +1,14 @@ +public class Main{ + public static void main(String[] args){ + System.out.print(" 8888888888 888 88888\n"); + System.out.print(" 88 88 88 88 88 88\n"); + System.out.print(" 8888 88 88 88 88888\n"); + System.out.print(" 88 88 888888888 88 88\n"); + System.out.print("88888888 88 88 88 88 888888\n\n"); + System.out.print("88 88 88 888 88888 888888\n"); + System.out.print("88 88 88 88 88 88 88 88\n"); + System.out.print("88 8888 88 88 88 88888 8888\n"); + System.out.print(" 888 888 888888888 88 88 88\n"); + System.out.print(" 88 88 88 88 88 88888888\n"); + } +} \ No newline at end of file From dbe6747b9b6fc8c3f0fe75b91d03c9b0e6919894 Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Sat, 3 Aug 2024 18:07:59 +0900 Subject: [PATCH 29/70] =?UTF-8?q?16394=EB=B2=88=20-=20=ED=99=8D=EC=9D=B5?= =?UTF-8?q?=EB=8C=80=ED=95=99=EA=B5=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/16394.java | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 202402715/16394.java diff --git a/202402715/16394.java b/202402715/16394.java new file mode 100644 index 0000000..a6dd9ec --- /dev/null +++ b/202402715/16394.java @@ -0,0 +1,8 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int a = sc.nextInt(); + System.out.print(a-1946); + } +} \ No newline at end of file From 679ea4289405c6dda585b099f32585bd1282ae36 Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Sat, 3 Aug 2024 18:08:10 +0900 Subject: [PATCH 30/70] =?UTF-8?q?25628=EB=B2=88=20-=20=ED=96=84=EB=B2=84?= =?UTF-8?q?=EA=B1=B0=20=EB=A7=8C=EB=93=A4=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/25628.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 202402715/25628.java diff --git a/202402715/25628.java b/202402715/25628.java new file mode 100644 index 0000000..8a3225d --- /dev/null +++ b/202402715/25628.java @@ -0,0 +1,12 @@ +import java.util.*; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int a = sc.nextInt(); + int b = sc.nextInt(); + a = a/2; + int[] k = {a,b}; + Arrays.sort(k); + System.out.print(k[0]); + } +} \ No newline at end of file From 6aed6f2f7b5df501a37c9f1080600dec5fae05cf Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Sat, 3 Aug 2024 18:08:20 +0900 Subject: [PATCH 31/70] =?UTF-8?q?13118=EB=B2=88=20-=20=EB=89=B4=ED=84=B4?= =?UTF-8?q?=EA=B3=BC=20=EC=82=AC=EA=B3=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/13118.java | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 202402715/13118.java diff --git a/202402715/13118.java b/202402715/13118.java new file mode 100644 index 0000000..1a527c0 --- /dev/null +++ b/202402715/13118.java @@ -0,0 +1,23 @@ +import java.util.*; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int[] num = new int[4]; + for(int i = 0; i<4; i++){ + num[i]=sc.nextInt(); + } + int x = sc.nextInt(); + int a= 0; + while(true){ + if(x==num[a]){ + System.out.print(a+1); + break; + } + a++; + if(a==4){ + System.out.print(0); + break; + } + } + } +} \ No newline at end of file From 7a522eb73a0ad79711c49a439414df47fc628678 Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Sat, 3 Aug 2024 18:08:33 +0900 Subject: [PATCH 32/70] =?UTF-8?q?31867=EB=B2=88=20-=20=ED=99=80=EC=A7=9D?= =?UTF-8?q?=ED=99=80=EC=A7=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/31867.java | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 202402715/31867.java diff --git a/202402715/31867.java b/202402715/31867.java new file mode 100644 index 0000000..529c533 --- /dev/null +++ b/202402715/31867.java @@ -0,0 +1,24 @@ +import java.util.*; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int l = sc.nextInt(); + int even = 0; + int odd = 0; + String k = sc.next(); + for(int i = 0; iodd){ + System.out.print("0"); + }else if(odd>even){ + System.out.print("1"); + }else{ + System.out.print("-1"); + } + } +} \ No newline at end of file From f16233553649d8d7d794dcf81df15d2ecd34693e Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Sat, 3 Aug 2024 18:08:52 +0900 Subject: [PATCH 33/70] =?UTF-8?q?10865=EB=B2=88=20-=20=EC=B9=9C=EA=B5=AC?= =?UTF-8?q?=20=EC=B9=9C=EA=B5=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/10865.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 202402715/10865.java diff --git a/202402715/10865.java b/202402715/10865.java new file mode 100644 index 0000000..db23475 --- /dev/null +++ b/202402715/10865.java @@ -0,0 +1,16 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int num = sc.nextInt(); + int k = sc.nextInt(); + int[] a = new int[num]; + for(int i = 0; i Date: Sat, 3 Aug 2024 18:09:14 +0900 Subject: [PATCH 34/70] =?UTF-8?q?19564=EB=B2=88=20-=20=EB=B0=98=EB=B3=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/19564.java | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 202402715/19564.java diff --git a/202402715/19564.java b/202402715/19564.java new file mode 100644 index 0000000..2a4498b --- /dev/null +++ b/202402715/19564.java @@ -0,0 +1,30 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + String in = sc.next(); + int a = 0; // 커서 위치 + int count = 1; //출력 + while(true){ + if(a+1==in.length()){ + break; + } + + if(in.charAt(a)>in.charAt(a+1)){ +// System.out.print(in.charAt(a)); +// System.out.print("\n"); + a++; + count++; + }else if(in.charAt(a)==in.charAt(a+1)){ + a++; + count++; + }else{ +// System.out.print(in.charAt(a)); + a++; + } + + + } + System.out.print(count); + } +} \ No newline at end of file From 96dda90d655c602d7d4366a24514dceb962743f3 Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Sat, 3 Aug 2024 18:09:23 +0900 Subject: [PATCH 35/70] =?UTF-8?q?25592=EB=B2=88=20-=20=EB=B0=94=EB=91=91?= =?UTF-8?q?=EB=8F=8C=20=EA=B2=8C=EC=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/25592.java | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 202402715/25592.java diff --git a/202402715/25592.java b/202402715/25592.java new file mode 100644 index 0000000..6a3d996 --- /dev/null +++ b/202402715/25592.java @@ -0,0 +1,26 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int count = 0; + int a = 0; + boolean sign = false; + int in = sc.nextInt(); + while(true){ + if(in Date: Sat, 3 Aug 2024 18:09:35 +0900 Subject: [PATCH 36/70] =?UTF-8?q?10250=EB=B2=88=20-=20ACM=20=ED=98=B8?= =?UTF-8?q?=ED=85=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/10250.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 202402715/10250.java diff --git a/202402715/10250.java b/202402715/10250.java new file mode 100644 index 0000000..465f663 --- /dev/null +++ b/202402715/10250.java @@ -0,0 +1,13 @@ +import java.util.*; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int a = sc.nextInt(); + + if(a%5==0){ + System.out.print(a/5); + }else{ + System.out.print(a/5+1); + } + } +} \ No newline at end of file From 534437d0b18c2c9311c1e0722eeb06c4c5bf0387 Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Sat, 3 Aug 2024 18:09:45 +0900 Subject: [PATCH 37/70] =?UTF-8?q?15727=EB=B2=88=20-=20=EC=A1=B0=EB=B3=84?= =?UTF-8?q?=EA=B3=BC=EC=A0=9C=EB=A5=BC=20=ED=95=98=EB=A0=A4=EB=8A=94?= =?UTF-8?q?=EB=8D=B0=20=EC=A1=B0=EC=9E=A5=EC=9D=B4=20=EC=82=AC=EB=9D=BC?= =?UTF-8?q?=EC=A1=8C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/15727.java | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 202402715/15727.java diff --git a/202402715/15727.java b/202402715/15727.java new file mode 100644 index 0000000..ac3f676 --- /dev/null +++ b/202402715/15727.java @@ -0,0 +1,36 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int num = sc.nextInt(); + for(int i = 0 ;i Date: Sat, 3 Aug 2024 18:09:57 +0900 Subject: [PATCH 38/70] =?UTF-8?q?20492=EB=B2=88=20-=20=EC=84=B8=EA=B8=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/20492.java | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 202402715/20492.java diff --git a/202402715/20492.java b/202402715/20492.java new file mode 100644 index 0000000..87d0c7a --- /dev/null +++ b/202402715/20492.java @@ -0,0 +1,10 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int a = sc.nextInt(); + System.out.print(a*78/100); + System.out.print(" "); + System.out.print(a- a*20/100*22/100); + } +} \ No newline at end of file From b363391aeb53716b5e1d2e311018c0cc9699c93d Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Sat, 3 Aug 2024 18:10:08 +0900 Subject: [PATCH 39/70] =?UTF-8?q?25238=EB=B2=88=20-=20=EA=B0=80=ED=9D=AC?= =?UTF-8?q?=EC=99=80=20=EB=B0=A9=EC=96=B4=EC=9C=A8=20=EB=AC=B4=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/25238.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 202402715/25238.java diff --git a/202402715/25238.java b/202402715/25238.java new file mode 100644 index 0000000..f8c2270 --- /dev/null +++ b/202402715/25238.java @@ -0,0 +1,14 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int a = sc.nextInt(); + int b = sc.nextInt(); + a = a*(100-b)/100; + if(a>99){ + System.out.print(0); + }else{ + System.out.print(1); + } + } +} \ No newline at end of file From 7079dda265d4eb12fab3f87d28b24a19fc230615 Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Sat, 3 Aug 2024 18:10:16 +0900 Subject: [PATCH 40/70] =?UTF-8?q?20540=EB=B2=88=20-=20=EC=97=B0=EA=B8=B8?= =?UTF-8?q?=EC=9D=B4=EC=9D=98=20=EC=9D=B4=EC=83=81=ED=98=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/20540.java | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 202402715/20540.java diff --git a/202402715/20540.java b/202402715/20540.java new file mode 100644 index 0000000..0260494 --- /dev/null +++ b/202402715/20540.java @@ -0,0 +1,31 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + String in = sc.next(); + + if(in.charAt(0)=='E'){ + System.out.print("I"); + }else{ + System.out.print("E"); + } + + if(in.charAt(1)=='N'){ + System.out.print("S"); + }else{ + System.out.print("N"); + } + + if(in.charAt(2)=='F'){ + System.out.print("T"); + }else{ + System.out.print("F"); + } + + if(in.charAt(3)=='P'){ + System.out.print("J"); + }else{ + System.out.print("P"); + } + } +} \ No newline at end of file From 79b7fd4361b15e5fa7e64f27f1796cc258441d50 Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Sat, 3 Aug 2024 18:10:26 +0900 Subject: [PATCH 41/70] =?UTF-8?q?2902=EB=B2=88=20-=20KMP=EB=8A=94=20?= =?UTF-8?q?=EC=99=9C=20KMP=EC=9D=BC=EA=B9=8C=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/2902.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 202402715/2902.java diff --git a/202402715/2902.java b/202402715/2902.java new file mode 100644 index 0000000..f52be0c --- /dev/null +++ b/202402715/2902.java @@ -0,0 +1,19 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + String in = sc.next(); + int i = 0; + while(true){ + if(in.charAt(i)>64&&in.charAt(i)<91){ + System.out.print(in.charAt(i)); + i++; + }else{ + i++; + } + if(i==in.length()){ + break; + } + } + } +} \ No newline at end of file From 7f4019a554341eb7792ae4ce7d9c83916ff1b2b9 Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Sat, 3 Aug 2024 18:10:36 +0900 Subject: [PATCH 42/70] =?UTF-8?q?21965=EB=B2=88=20-=20=EB=93=9C=EB=86=92?= =?UTF-8?q?=EC=9D=80=20=EB=82=A8=EC=82=B0=20=EC=9C=84=EC=97=90=20=EC=9A=B0?= =?UTF-8?q?=EB=9A=9D=20=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/21965.java | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 202402715/21965.java diff --git a/202402715/21965.java b/202402715/21965.java new file mode 100644 index 0000000..3aeaf5e --- /dev/null +++ b/202402715/21965.java @@ -0,0 +1,37 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int num = sc.nextInt(); + int[] a = new int[num]; + boolean up = true; + for(int i = 0; i a[i]){ + up = false; +// System.out.println(up); + } + }else { + if(a[i-1] Date: Sat, 3 Aug 2024 18:10:47 +0900 Subject: [PATCH 43/70] =?UTF-8?q?2929=EB=B2=88=20-=20=EB=A8=B8=EC=8B=A0=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/2929.java | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 202402715/2929.java diff --git a/202402715/2929.java b/202402715/2929.java new file mode 100644 index 0000000..83c0447 --- /dev/null +++ b/202402715/2929.java @@ -0,0 +1,41 @@ +import java.util.*; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + String in = sc.next(); + int count = 0; + int k = 0; + LinkedList a = new LinkedList<>(); + for(int i = 0; i Date: Sat, 3 Aug 2024 18:10:54 +0900 Subject: [PATCH 44/70] =?UTF-8?q?9070=EB=B2=88=20-=20=EC=9E=A5=EB=B3=B4?= =?UTF-8?q?=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/9070.java | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 202402715/9070.java diff --git a/202402715/9070.java b/202402715/9070.java new file mode 100644 index 0000000..49ab1b9 --- /dev/null +++ b/202402715/9070.java @@ -0,0 +1,29 @@ +public class m { + +} +import java.util.*; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int k = sc.nextInt(); + for(int i = 0; i (o1[0] == o2[0] ? o1[1] - o2[1] : o2[0] - o1[0])); + System.out.println(in[0][1]); + /* + for(int j = 0; j < b; j++){ + System.out.println(in[j][0] + " "+in[j][1]); + } + System.out.println(); + */ + } + } +} \ No newline at end of file From 39ad9ed9563d48a7b5659b558f8f6383856cb1b8 Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Thu, 29 Aug 2024 22:56:51 +0900 Subject: [PATCH 45/70] =?UTF-8?q?14928=EB=B2=88=20-=20=ED=81=B0=20?= =?UTF-8?q?=EC=88=98=20(BIG)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/14928.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 202402715/14928.java diff --git a/202402715/14928.java b/202402715/14928.java new file mode 100644 index 0000000..a45fae7 --- /dev/null +++ b/202402715/14928.java @@ -0,0 +1,12 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + String num = sc.next(); + int tem = 0; + for(int i = 0; i Date: Thu, 29 Aug 2024 22:57:34 +0900 Subject: [PATCH 46/70] =?UTF-8?q?14656=EB=B2=88=20-=20=EC=A1=B0=EA=B5=90?= =?UTF-8?q?=EB=8A=94=20=EC=83=88=EB=94=94=EC=8A=A4=ED=8A=B8=EC=95=BC!!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/14656.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 202402715/14656.java diff --git a/202402715/14656.java b/202402715/14656.java new file mode 100644 index 0000000..95c28d9 --- /dev/null +++ b/202402715/14656.java @@ -0,0 +1,14 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int a = sc.nextInt(); + int count = 0; + for(int i = 0; i Date: Thu, 29 Aug 2024 22:57:43 +0900 Subject: [PATCH 47/70] =?UTF-8?q?21312=EB=B2=88=20-=20=ED=99=80=EC=A7=9D?= =?UTF-8?q?=20=EC=B9=B5=ED=85=8C=EC=9D=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/21312.java | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 202402715/21312.java diff --git a/202402715/21312.java b/202402715/21312.java new file mode 100644 index 0000000..8b88670 --- /dev/null +++ b/202402715/21312.java @@ -0,0 +1,27 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int[] a = new int[3]; + for(int i = 0; i<3;i++){ + a[i] = sc.nextInt(); + } + int[] b = {a[0], a[1], a[2]}; + int out= 0; + int odd = 0; + for(int i = 0; i<3;i++){ + if(a[i]%2==1){ + odd++; + } + a[i] = a[i]*(a[i]%2); + if(a[i]==0){ + a[i]++; + } + } + if(odd == 0){ + System.out.print(b[0]*b[1]*b[2]); + }else{ + System.out.print(a[0]*a[1]*a[2]); + } + } +} \ No newline at end of file From 67eae30564f53d37ba49514bdb3031b08fb1529b Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Thu, 29 Aug 2024 22:58:05 +0900 Subject: [PATCH 48/70] =?UTF-8?q?9546=EB=B2=88=20-=203000=EB=B2=88=20?= =?UTF-8?q?=EB=B2=84=EC=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/9546.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 202402715/9546.java diff --git a/202402715/9546.java b/202402715/9546.java new file mode 100644 index 0000000..cee2b47 --- /dev/null +++ b/202402715/9546.java @@ -0,0 +1,16 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int a = sc.nextInt(); + int out = 1; + for(int i = 0; i Date: Thu, 29 Aug 2024 22:58:11 +0900 Subject: [PATCH 49/70] =?UTF-8?q?14625=EB=B2=88=20-=20=EB=83=89=EB=8F=99?= =?UTF-8?q?=EC=8B=9D=ED=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/14625.java | 58 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 202402715/14625.java diff --git a/202402715/14625.java b/202402715/14625.java new file mode 100644 index 0000000..7fd172a --- /dev/null +++ b/202402715/14625.java @@ -0,0 +1,58 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + int h1 = sc.nextInt(); + int m1 = sc.nextInt(); + int h2 = sc.nextInt(); + int m2 = sc.nextInt(); + int count = 0; + int a = sc.nextInt(); + + if(h2-h1==0) { + if(h1/10==a||h1%10==a) { + count = m2-m1+1; + }else { + for(int i = m1; i Date: Thu, 29 Aug 2024 22:58:22 +0900 Subject: [PATCH 50/70] =?UTF-8?q?4150=EB=B2=88=20-=20=ED=94=BC=EB=B3=B4?= =?UTF-8?q?=EB=82=98=EC=B9=98=20=EC=88=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/4150.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 202402715/4150.java diff --git a/202402715/4150.java b/202402715/4150.java new file mode 100644 index 0000000..5e52a83 --- /dev/null +++ b/202402715/4150.java @@ -0,0 +1,22 @@ +import java.util.Scanner; +import java.math.*; +public class Main{ + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + int a = sc.nextInt(); + if(a==1||a==2) { + System.out.print(1); + System.exit(0); + } + BigInteger v1 = BigInteger.valueOf(1); + BigInteger v2 = BigInteger.valueOf(1); + BigInteger s = BigInteger.valueOf(0); + for(int i = 0; i Date: Thu, 29 Aug 2024 22:58:30 +0900 Subject: [PATCH 51/70] =?UTF-8?q?18311=EB=B2=88=20-=20=EC=99=95=EB=B3=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/18311.java | 60 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 202402715/18311.java diff --git a/202402715/18311.java b/202402715/18311.java new file mode 100644 index 0000000..293f172 --- /dev/null +++ b/202402715/18311.java @@ -0,0 +1,60 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + int a = sc.nextInt(); + long b = sc.nextLong(); + long[] arr = new long[a*2+1]; + long[] a2 = new long[a]; + + for(int i = 0; ia) { + System.out.print(a*2-i); +// System.out.println(); + }else { + System.out.print(i+1); +// System.out.println(); + } + }else if(b==arr[i]){ +// System.out.printf("c2 %d\n", i); + if(i==a){ + System.out.print(i); +// System.out.println(); + } + else if(i>a) { + System.out.print(a*2-i); +// System.out.println(); + }else { + System.out.print(i+1); +// System.out.println(); + } + } + } + + + +// for(int i = 0; i Date: Thu, 29 Aug 2024 23:10:14 +0900 Subject: [PATCH 52/70] =?UTF-8?q?11557=EB=B2=88=20-=20Yangjojang=20of=20Th?= =?UTF-8?q?e=20Year?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/11557.java | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 202402715/11557.java diff --git a/202402715/11557.java b/202402715/11557.java new file mode 100644 index 0000000..fddd8b0 --- /dev/null +++ b/202402715/11557.java @@ -0,0 +1,33 @@ +import java.util.*; +public class Main{ + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + int a = sc.nextInt(); + for(int i = 0; i() { + + public int compare(String[] o1, String[] o2) { + return Integer.valueOf(o1[1]).compareTo(Integer.valueOf(o2[1])); + } + }); + + /*for(int k = 0; k<2; k++) { + for(int j = 0; j Date: Thu, 29 Aug 2024 23:10:22 +0900 Subject: [PATCH 53/70] =?UTF-8?q?10101=EB=B2=88=20-=20=EC=82=BC=EA=B0=81?= =?UTF-8?q?=ED=98=95=20=EC=99=B8=EC=9A=B0=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/10101.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 202402715/10101.java diff --git a/202402715/10101.java b/202402715/10101.java new file mode 100644 index 0000000..f705ec6 --- /dev/null +++ b/202402715/10101.java @@ -0,0 +1,19 @@ +import java.util.*; +public class Main{ + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + int a = sc.nextInt(); + int b = sc.nextInt(); + int c = sc.nextInt(); + + if(a+b+c != 180) { + System.out.print("Error"); + }else if(a==b && b==c){ + System.out.print("Equilateral"); + }else if(a==b || a==c || b==c) { + System.out.print("Isosceles"); + }else { + System.out.print("Scalene"); + } + } +} \ No newline at end of file From 43858747a31db76112f55414b6dcec1e49921d2a Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Thu, 29 Aug 2024 23:10:31 +0900 Subject: [PATCH 54/70] =?UTF-8?q?25629=EB=B2=88=20-=20=ED=99=80=EC=A7=9D?= =?UTF-8?q?=20=EC=88=98=EC=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/25629.java | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 202402715/25629.java diff --git a/202402715/25629.java b/202402715/25629.java new file mode 100644 index 0000000..5570187 --- /dev/null +++ b/202402715/25629.java @@ -0,0 +1,31 @@ +import java.util.*; +public class Main{ + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + int a = sc.nextInt(); + int[] in = new int[a]; + int odd = 0; + int even = 0; + for(int i = 0; i < a;i++) { + in[i] = sc.nextInt(); + } + + for(int i = 0; i < a;i++) { + if(in[i]%2==0) { + even++; + }else { + odd++; + } + } + + if(odd-even>1 || even-odd>1) { + System.out.print(0); + }else if(odd==even) { + System.out.print(1); + }else if(odd-even==1) { + System.out.print(1); + }else if(even-odd==1) { + System.out.print(0); + } + } +} \ No newline at end of file From 1f5c40a69149eaf3c804ca276744c365358163cc Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Thu, 29 Aug 2024 23:10:39 +0900 Subject: [PATCH 55/70] =?UTF-8?q?30032=EB=B2=88=20-=20=EC=95=8C=ED=8C=8C?= =?UTF-8?q?=EB=B2=B3=20=EB=92=A4=EC=A7=91=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/30032.java | 57 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 202402715/30032.java diff --git a/202402715/30032.java b/202402715/30032.java new file mode 100644 index 0000000..90d6ea2 --- /dev/null +++ b/202402715/30032.java @@ -0,0 +1,57 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int q = sc.nextInt(); + int b = sc.nextInt(); + char[][] in = new char[q][q]; + for(int j = 0; j Date: Thu, 29 Aug 2024 23:10:45 +0900 Subject: [PATCH 56/70] =?UTF-8?q?1212=EB=B2=88=20-=208=EC=A7=84=EC=88=98?= =?UTF-8?q?=202=EC=A7=84=EC=88=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/1212.java | 57 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 202402715/1212.java diff --git a/202402715/1212.java b/202402715/1212.java new file mode 100644 index 0000000..90d6ea2 --- /dev/null +++ b/202402715/1212.java @@ -0,0 +1,57 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int q = sc.nextInt(); + int b = sc.nextInt(); + char[][] in = new char[q][q]; + for(int j = 0; j Date: Thu, 29 Aug 2024 23:10:59 +0900 Subject: [PATCH 57/70] =?UTF-8?q?7567=EB=B2=88=20-=20=EA=B7=B8=EB=A6=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/7567.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 202402715/7567.java diff --git a/202402715/7567.java b/202402715/7567.java new file mode 100644 index 0000000..813b588 --- /dev/null +++ b/202402715/7567.java @@ -0,0 +1,16 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + String in = sc.next(); + int count = 10; + for(int i = 1; i Date: Thu, 29 Aug 2024 23:11:08 +0900 Subject: [PATCH 58/70] =?UTF-8?q?10989=EB=B2=88=20-=20=EC=88=98=20?= =?UTF-8?q?=EC=A0=95=EB=A0=AC=ED=95=98=EA=B8=B0=203?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/10989.java | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 202402715/10989.java diff --git a/202402715/10989.java b/202402715/10989.java new file mode 100644 index 0000000..983d303 --- /dev/null +++ b/202402715/10989.java @@ -0,0 +1,25 @@ +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.io.IOException; +import java.util.Arrays; + +public class Main { + public static void main(String[] args) throws NumberFormatException, IOException { + BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); + StringBuilder sb = new StringBuilder(); + + int a = Integer.parseInt(br.readLine()); + int[]num = new int[a]; + + for(int i = 0; i Date: Thu, 29 Aug 2024 23:11:30 +0900 Subject: [PATCH 59/70] =?UTF-8?q?10814=EB=B2=88=20-=20=EB=82=98=EC=9D=B4?= =?UTF-8?q?=EC=88=9C=20=EC=A0=95=EB=A0=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/10814.java | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 202402715/10814.java diff --git a/202402715/10814.java b/202402715/10814.java new file mode 100644 index 0000000..ca49271 --- /dev/null +++ b/202402715/10814.java @@ -0,0 +1,31 @@ +import java.util.Arrays; +import java.util.Comparator; +import java.util.Scanner; +public class Main { + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + int a = sc.nextInt(); + String[][] in = new String[a][3]; + int q = 0; + for(int i = 0; i() { + public int compare(String[] o1, String[] o2) { + int firstComparison = Integer.compare(Integer.parseInt(o1[0]), Integer.parseInt(o2[0])); + if (firstComparison==0) { + return Integer.compare(Integer.parseInt(o1[2]), Integer.parseInt(o2[2])); + } + return firstComparison; + } + }); + + for(int i = 0; i Date: Thu, 29 Aug 2024 23:11:43 +0900 Subject: [PATCH 60/70] =?UTF-8?q?15726=EB=B2=88=20-=20=EC=9D=B4=EC=B9=99?= =?UTF-8?q?=EC=97=B0=EC=82=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/15726.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 202402715/15726.java diff --git a/202402715/15726.java b/202402715/15726.java new file mode 100644 index 0000000..e9b51ae --- /dev/null +++ b/202402715/15726.java @@ -0,0 +1,15 @@ +import java.util.*; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + double a = sc.nextInt(); + double b = sc.nextInt(); + double c = sc.nextInt(); + + if(a*b/c>a/b*c) { + System.out.print((int)(a*b/c)); + }else { + System.out.print((int)(a/b*c)); + } + } +} \ No newline at end of file From 18592102ff9173376fe75db92e8b53322ce10d8e Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Thu, 29 Aug 2024 23:11:53 +0900 Subject: [PATCH 61/70] =?UTF-8?q?19698=EB=B2=88=20-=20=ED=97=9B=EA=B0=84?= =?UTF-8?q?=20=EC=B2=AD=EC=95=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/19698.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 202402715/19698.java diff --git a/202402715/19698.java b/202402715/19698.java new file mode 100644 index 0000000..7e1174c --- /dev/null +++ b/202402715/19698.java @@ -0,0 +1,18 @@ +import java.util.*; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int N = sc.nextInt(); + int W = sc.nextInt(); + int H = sc.nextInt(); + int L = sc.nextInt(); + + W = W/L; + H = H/L; + if(W*H Date: Thu, 29 Aug 2024 23:12:07 +0900 Subject: [PATCH 62/70] =?UTF-8?q?6359=EB=B2=88=20-=20=EB=A7=8C=EC=B7=A8?= =?UTF-8?q?=ED=95=9C=20=EC=83=81=EB=B2=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/6359.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 202402715/6359.java diff --git a/202402715/6359.java b/202402715/6359.java new file mode 100644 index 0000000..08ea297 --- /dev/null +++ b/202402715/6359.java @@ -0,0 +1,22 @@ +import java.util.*; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int a = sc.nextInt(); + for(int i = 0 ;i Date: Thu, 29 Aug 2024 23:12:22 +0900 Subject: [PATCH 63/70] =?UTF-8?q?15813=EB=B2=88=20-=20=EB=84=88=EC=9D=98?= =?UTF-8?q?=20=EC=9D=B4=EB=A6=84=EC=9D=80=20=EB=AA=87=20=EC=A0=90=EC=9D=B4?= =?UTF-8?q?=EB=8B=88=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/15813.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 202402715/15813.java diff --git a/202402715/15813.java b/202402715/15813.java new file mode 100644 index 0000000..bebb22b --- /dev/null +++ b/202402715/15813.java @@ -0,0 +1,14 @@ +import java.util.*; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int a = sc.nextInt(); + String in = sc.next(); + int cnt = 0; + for(int i = 0; i Date: Thu, 29 Aug 2024 23:12:35 +0900 Subject: [PATCH 64/70] =?UTF-8?q?16497=EB=B2=88=20-=20=EB=8C=80=EC=B6=9C?= =?UTF-8?q?=20=EC=9A=94=EC=B2=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/16497.java | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 202402715/16497.java diff --git a/202402715/16497.java b/202402715/16497.java new file mode 100644 index 0000000..b672bb8 --- /dev/null +++ b/202402715/16497.java @@ -0,0 +1,31 @@ +import java.util.*; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int a = sc.nextInt(); + int[][] arr = new int[2][a]; + int[] cnt = new int[31]; + for(int i=0;inum) { + System.out.print(0); + break; + } + } + } +} \ No newline at end of file From e6f42221abc1eb5f524c4dc17ecaa1da05899ca8 Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Thu, 29 Aug 2024 23:12:44 +0900 Subject: [PATCH 65/70] =?UTF-8?q?8979=EB=B2=88=20-=20=EC=98=AC=EB=A6=BC?= =?UTF-8?q?=ED=94=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/8979.java | 50 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 202402715/8979.java diff --git a/202402715/8979.java b/202402715/8979.java new file mode 100644 index 0000000..99d29c1 --- /dev/null +++ b/202402715/8979.java @@ -0,0 +1,50 @@ +import java.util.*; +public class Main{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int a = sc.nextInt(); + int b = sc.nextInt(); + int[][] arr = new int[a][4]; + for(int i = 0; i() { + @Override + public int compare(int[] o1, int[] o2) { + if (o1[1] != o2[1]) { + return o2[1] - o1[1]; + } else if (o1[2] != o2[2]) { + return o2[2] - o1[2]; + } else { + return o2[3] - o1[3]; + } + } + }); + + int rank = 1; + for (int i = 0; i < a; i++) { + if (i > 0 && + arr[i][1] == arr[i-1][1] && + arr[i][2] == arr[i-1][2] && + arr[i][3] == arr[i-1][3]) { + + }else { + rank = i + 1; + } + if (arr[i][0] == b) { + System.out.println(rank); + break; + } + } + + /*for(int i = 0; i Date: Thu, 29 Aug 2024 23:13:07 +0900 Subject: [PATCH 66/70] =?UTF-8?q?27433=EB=B2=88=20-=20=ED=8C=A9=ED=86=A0?= =?UTF-8?q?=EB=A6=AC=EC=96=BC=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/27433.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 202402715/27433.java diff --git a/202402715/27433.java b/202402715/27433.java new file mode 100644 index 0000000..7d4ebcb --- /dev/null +++ b/202402715/27433.java @@ -0,0 +1,15 @@ +import java.util.*; +public class Main{ + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + long a = sc.nextLong(); + if(a==0) { + System.out.print(1); + }else { + for(long i = a-1; i>0;i--) { + a = a*i; + } + System.out.print(a); + } + } +} \ No newline at end of file From 2ef16171cad508cd69d7d4573279c1aacbe73d97 Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Thu, 29 Aug 2024 23:13:19 +0900 Subject: [PATCH 67/70] =?UTF-8?q?11283=EB=B2=88=20-=20=ED=95=9C=EA=B8=80?= =?UTF-8?q?=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/11283.java | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 202402715/11283.java diff --git a/202402715/11283.java b/202402715/11283.java new file mode 100644 index 0000000..27227cd --- /dev/null +++ b/202402715/11283.java @@ -0,0 +1,9 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + String in = sc.next(); + int a = in.charAt(0); + System.out.println(a-44031); + } +} \ No newline at end of file From e7a3503304964866cfba5b756bc63bfff8e02189 Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Thu, 29 Aug 2024 23:13:28 +0900 Subject: [PATCH 68/70] =?UTF-8?q?6322=EB=B2=88=20-=20=EC=A7=81=EA=B0=81=20?= =?UTF-8?q?=EC=82=BC=EA=B0=81=ED=98=95=EC=9D=98=20=EB=91=90=20=EB=B3=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/6322.java | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 202402715/6322.java diff --git a/202402715/6322.java b/202402715/6322.java new file mode 100644 index 0000000..3b2e89c --- /dev/null +++ b/202402715/6322.java @@ -0,0 +1,35 @@ +import java.util.Scanner; +public class Main{ + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + int i = 1; + while(true) { + int a = sc.nextInt(); + int b = sc.nextInt(); + int c = sc.nextInt(); + + if(a==0) { + break; + } + System.out.printf("Triangle #%d\n", i); + + if(c == -1) { + System.out.printf("c = %.3f\n",(double)Math.sqrt(a*a + b*b)); + }else if(a == -1){ + if((c*c - b*b)<0 || (c*c - b*b)==0) { + System.out.println("Impossible."); + }else { + System.out.printf("a = %.3f\n",(double)Math.sqrt(c*c - b*b)); + } + }else if(b == -1) { + if((c*c - a*a)<0 || (c*c - a*a)==0) { + System.out.println("Impossible."); + }else { + System.out.printf("b = %.3f\n",(double)Math.sqrt(c*c - a*a)); + } + } + System.out.println(); + i++; + } + } +} \ No newline at end of file From 30fa1c5076b7fa17adae7bf6ad2b65ad3396274c Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Thu, 29 Aug 2024 23:13:37 +0900 Subject: [PATCH 69/70] =?UTF-8?q?1668=EB=B2=88=20-=20=ED=8A=B8=EB=A1=9C?= =?UTF-8?q?=ED=94=BC=20=EC=A7=84=EC=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/1668.java | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 202402715/1668.java diff --git a/202402715/1668.java b/202402715/1668.java new file mode 100644 index 0000000..8a2a73d --- /dev/null +++ b/202402715/1668.java @@ -0,0 +1,30 @@ +import java.util.*; +public class Main{ + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + int k = sc.nextInt(); + int cnt = 1; + int[] arr = new int[k]; + + for(int i = 0; inum) { + num = arr[i]; + cnt++; + } + } + System.out.println(cnt); + cnt = 1; + num = arr[k-1]; + for(int i = k-1; i>-1; i--) { + if(arr[i]>num) { + num = arr[i]; + cnt++; + } + } + System.out.print(cnt); + } +} \ No newline at end of file From b4cb018de6c0232b636e08f5de08d815e14d8794 Mon Sep 17 00:00:00 2001 From: becky5432 <165632128+becky5432@users.noreply.github.com> Date: Thu, 29 Aug 2024 23:13:52 +0900 Subject: [PATCH 70/70] =?UTF-8?q?25755=EB=B2=88=20-=20=EA=B1=B0=EC=9A=B8?= =?UTF-8?q?=EB=B0=98=EC=82=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202402715/25755.java | 64 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 202402715/25755.java diff --git a/202402715/25755.java b/202402715/25755.java new file mode 100644 index 0000000..138288b --- /dev/null +++ b/202402715/25755.java @@ -0,0 +1,64 @@ +import java.util.*; +public class Main{ + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + String in = sc.next(); + int k = sc.nextInt(); + String[][] arr = new String[k][k]; + String[][] narr = new String[k][k]; + + for(int i = 0; i0;j--) { + System.out.printf("%s ", arr[i][j-1]); + } + System.out.println(); + } + break; + case("R"): + for(int i = 0; i0;j--) { + System.out.printf("%s ", arr[i][j-1]); + } + System.out.println(); + } + break; + case("U"): + for(int i = k; i>0;i--) { + for(int j = 0; j0;i--) { + for(int j = 0; j