From ecfb8ca5497bbcd498459f0101378d8004a0d307 Mon Sep 17 00:00:00 2001 From: LiiNi-coder <97495437+LiiNi-coder@users.noreply.github.com> Date: Mon, 3 Nov 2025 23:07:19 +0900 Subject: [PATCH] =?UTF-8?q?[20251103]=20PGM=20/=20LV2=20/=202xn=20?= =?UTF-8?q?=ED=83=80=EC=9D=BC=EB=A7=81=20/=20=EC=9D=B4=EC=9D=B8=ED=9D=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...03 PGM 2xn\355\203\200\354\235\274\353\247\201" | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 "LiiNi-coder/202511/03 PGM 2xn\355\203\200\354\235\274\353\247\201" diff --git "a/LiiNi-coder/202511/03 PGM 2xn\355\203\200\354\235\274\353\247\201" "b/LiiNi-coder/202511/03 PGM 2xn\355\203\200\354\235\274\353\247\201" new file mode 100644 index 00000000..269c09e7 --- /dev/null +++ "b/LiiNi-coder/202511/03 PGM 2xn\355\203\200\354\235\274\353\247\201" @@ -0,0 +1,14 @@ +```java +class Solution { + public int solution(int n) { + long[] dp = new long[60001]; + dp[0] = 0; + dp[1] = 1; + dp[2] = 2; + for(int i = 3; i <= n; i++){ + dp[i] = (dp[i-1] + dp[i-2]) % 1000000007; + } + return (int)dp[n]; + } +} +```