Skip to content

Commit c7992e2

Browse files
committed
[Bronze IV] Title: 베라의 패션, Time: 104 ms, Memory: 14160 KB -BaekjoonHub
1 parent effa1dc commit c7992e2

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# [Bronze IV] 베라의 패션 - 15439
2+
3+
[문제 링크](https://www.acmicpc.net/problem/15439)
4+
5+
### 성능 요약
6+
7+
메모리: 14160 KB, 시간: 104 ms
8+
9+
### 분류
10+
11+
구현, 조합론, 수학
12+
13+
### 제출 일자
14+
15+
2025년 3월 20일 22:45:17
16+
17+
### 문제 설명
18+
19+
<p>베라는 상의 N 벌과 하의 N 벌이 있다. i 번째 상의와 i 번째 하의는 모두 색상 i를 가진다. N 개의 색상은 모두 서로 다르다.</p>
20+
21+
<p>상의와 하의가 서로 다른 색상인 조합은 총 몇 가지일까?</p>
22+
23+
### 입력
24+
25+
<p>입력은 아래와 같이 주어진다.</p>
26+
27+
<pre>N</pre>
28+
29+
### 출력
30+
31+
<p>상의와 하의가 서로 다른 색상인 조합의 가짓수를 출력한다.</p>
32+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import java.io.*;
2+
3+
public class Main {
4+
public static void main(String[] args) throws IOException {
5+
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
6+
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
7+
int i = Integer.parseInt(br.readLine());
8+
bw.write(String.valueOf(i * (i - 1)));
9+
bw.flush();
10+
bw.close();
11+
br.close();
12+
}
13+
}

0 commit comments

Comments
 (0)