From 0527e2a230cc76ae4fdd51881c69ce6fbf04d91c Mon Sep 17 00:00:00 2001 From: sieunnnn Date: Fri, 13 Oct 2023 16:45:19 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B0=B1=EC=A4=80/=EB=8B=A8=EA=B3=84=EB=B3=84:?= =?UTF-8?q?=2015439=20=EB=B2=A0=EB=9D=BC=EC=9D=98=20=ED=8C=A8=EC=85=98=20(?= =?UTF-8?q?#23)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/baekjoon/step/combinatoric/PROB15439.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/baekjoon/step/combinatoric/PROB15439.java diff --git a/src/baekjoon/step/combinatoric/PROB15439.java b/src/baekjoon/step/combinatoric/PROB15439.java new file mode 100644 index 0000000..ccd5495 --- /dev/null +++ b/src/baekjoon/step/combinatoric/PROB15439.java @@ -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); + } +}