Skip to content

Commit

Permalink
백준/단계별: 15439 베라의 패션 (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
sieunnnn committed Oct 13, 2023
1 parent 2833e5c commit 0527e2a
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/baekjoon/step/combinatoric/PROB15439.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package baekjoon.step.combinatoric;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class PROB15439 {

static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
static int N;
static int cnt;

public static void main(String[] args) throws IOException {
N = Integer.parseInt(br.readLine());

for (int i = 0; i < N; i ++) {
for (int j = i + 1; j < N; j ++) {
cnt ++;
}
}

System.out.println(cnt * 2);
}
}

0 comments on commit 0527e2a

Please sign in to comment.