From a6d645a9b2a204f28cd9227d79b8b3e233a474ea Mon Sep 17 00:00:00 2001 From: suyeun84 <81475092+suyeun84@users.noreply.github.com> Date: Sat, 26 Jul 2025 22:11:04 +0900 Subject: [PATCH] =?UTF-8?q?[20250726]=20BOJ=20/=20G5=20/=20=ED=95=A9?= =?UTF-8?q?=EB=B6=84=ED=95=B4=20/=20=EA=B9=80=EC=88=98=EC=97=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...5 \355\225\251\353\266\204\355\225\264.md" | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 "suyeun84/202507/26 BOJ G5 \355\225\251\353\266\204\355\225\264.md" diff --git "a/suyeun84/202507/26 BOJ G5 \355\225\251\353\266\204\355\225\264.md" "b/suyeun84/202507/26 BOJ G5 \355\225\251\353\266\204\355\225\264.md" new file mode 100644 index 00000000..657687cc --- /dev/null +++ "b/suyeun84/202507/26 BOJ G5 \355\225\251\353\266\204\355\225\264.md" @@ -0,0 +1,29 @@ +```java +import java.io.*; +import java.util.*; + +public class boj2225 { + static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); + static StringTokenizer st; + static void nextLine() throws Exception {st = new StringTokenizer(br.readLine());} + static int nextInt() {return Integer.parseInt(st.nextToken());} + + public static void main(String[] args) throws Exception { + nextLine(); + int N = nextInt(); + int K = nextInt(); + + long [][]dp=new long [N+1][K+1]; + + for(int i = 1; i <= N; i++) { + for(int j = 1; j <= K; j++) { + dp[i][j] = 1; + for(int k = 1; k <= N; k++) { + dp[i][j] += dp[k][j-1] % 1000000000; + } + } + } + System.out.println(dp[N][K] % 1000000000); + } +} +```