From ceeb65a49105fa894ca0f9eb0fcf119f4b9f5519 Mon Sep 17 00:00:00 2001 From: SehyeonLee <909am@neostack.co.kr> Date: Thu, 6 Feb 2025 17:26:09 +0900 Subject: [PATCH 1/2] =?UTF-8?q?problems=20=EB=AC=B8=EC=A0=9C=20=ED=92=80?= =?UTF-8?q?=EC=9D=B4=20=EC=99=84=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- problems/terry/p_1.java | 40 +++++++++++++++++++++++++++++++++++ problems/terry/p_2.java | 43 ++++++++++++++++++++++++++++++++++++++ problems/terry/p_3.java | 46 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 129 insertions(+) create mode 100644 problems/terry/p_1.java create mode 100644 problems/terry/p_2.java create mode 100644 problems/terry/p_3.java diff --git a/problems/terry/p_1.java b/problems/terry/p_1.java new file mode 100644 index 0000000..c56ea61 --- /dev/null +++ b/problems/terry/p_1.java @@ -0,0 +1,40 @@ +package study.d_250206; + +import java.util.*; +import java.io.*; + +public class p_1 { + public static void main(String[] args) throws IOException { + BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); + BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); + + //given + int n = Integer.parseInt(br.readLine()); + int arr[][] = new int[n][n]; + + + //when + // 배열 초기화 + for (int i = 0; i < n; i++) { + StringTokenizer st = new StringTokenizer(br.readLine()); + for (int j = 0; j < n; j++) { + arr[i][j] = Integer.parseInt(st.nextToken()); + } + } + + //then + int sum = 0; + + for(int i = 0; i Date: Fri, 7 Feb 2025 00:53:58 +0900 Subject: [PATCH 2/2] =?UTF-8?q?problems=20=EC=BD=94=EB=93=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- problems/terry/p_1.java | 11 +++++------ problems/terry/p_2.java | 4 ++-- problems/terry/p_3.java | 4 ++-- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/problems/terry/p_1.java b/problems/terry/p_1.java index c56ea61..fdbaa67 100644 --- a/problems/terry/p_1.java +++ b/problems/terry/p_1.java @@ -1,4 +1,4 @@ -package study.d_250206; +package study.problems; import java.util.*; import java.io.*; @@ -10,7 +10,7 @@ public static void main(String[] args) throws IOException { //given int n = Integer.parseInt(br.readLine()); - int arr[][] = new int[n][n]; + int[][] arr = new int[n][n]; //when @@ -25,11 +25,10 @@ public static void main(String[] args) throws IOException { //then int sum = 0; - for(int i = 0; i