Skip to content

Commit 977ae6a

Browse files
committed
[Silver II] Title: 종이의 개수, Time: 1132 ms, Memory: 322360 KB -BaekjoonHub
1 parent e85d614 commit 977ae6a

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

백준/Silver/1780. 종이의 개수/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
### 성능 요약
66

7-
메모리: 321820 KB, 시간: 1160 ms
7+
메모리: 322360 KB, 시간: 1132 ms
88

99
### 분류
1010

1111
분할 정복, 재귀
1212

1313
### 제출 일자
1414

15-
2025년 8월 4일 23:16:38
15+
2025년 8월 4일 23:19:07
1616

1717
### 문제 설명
1818

백준/Silver/1780. 종이의 개수/종이의 개수.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,20 @@ public static void main(String[] args) throws Exception {
99
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
1010
int n = Integer.parseInt(br.readLine());
1111
map = new int[n][n];
12+
13+
StringBuilder result = new StringBuilder();
14+
1215
for (int i = 0; i < n; i++) {
1316
int[] inputArr = Arrays.stream(br.readLine().split(" "))
1417
.mapToInt(Integer::parseInt)
1518
.toArray();
1619
System.arraycopy(inputArr, 0, map[i], 0, n);
1720
}
1821
solve(0, 0, n);
19-
System.out.println(count[0]);
20-
System.out.println(count[1]);
21-
System.out.println(count[2]);
22+
result.append(count[0]).append("\n")
23+
.append(count[1]).append("\n")
24+
.append(count[2]);
25+
System.out.println(result);
2226
}
2327

2428
static void solve(int x, int y, int size) {
@@ -38,4 +42,4 @@ static void solve(int x, int y, int size) {
3842
}
3943
count[v + 1]++;
4044
}
41-
}
45+
}

0 commit comments

Comments
 (0)