From 63ad7d6983d4b993d1910729ec0346142d10c847 Mon Sep 17 00:00:00 2001 From: jo Date: Tue, 19 Mar 2024 19:50:46 +0900 Subject: [PATCH] =?UTF-8?q?BOJ9461=5F=ED=8C=8C=EB=8F=84=EB=B0=98=5F?= =?UTF-8?q?=EC=88=98=EC=97=B4=5F=EC=8B=A4=EB=B2=843=5F=EC=A1=B0=EC=9E=AC?= =?UTF-8?q?=EC=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...2\2043_\354\241\260\354\236\254\354\235\200.py" | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 "study/baekjoon/week7/BOJ9461_\355\214\214\353\217\204\353\260\230_\354\210\230\354\227\264/BOJ9461_\355\214\214\353\217\204\353\260\230_\354\210\230\354\227\264_\354\213\244\353\262\2043_\354\241\260\354\236\254\354\235\200.py" diff --git "a/study/baekjoon/week7/BOJ9461_\355\214\214\353\217\204\353\260\230_\354\210\230\354\227\264/BOJ9461_\355\214\214\353\217\204\353\260\230_\354\210\230\354\227\264_\354\213\244\353\262\2043_\354\241\260\354\236\254\354\235\200.py" "b/study/baekjoon/week7/BOJ9461_\355\214\214\353\217\204\353\260\230_\354\210\230\354\227\264/BOJ9461_\355\214\214\353\217\204\353\260\230_\354\210\230\354\227\264_\354\213\244\353\262\2043_\354\241\260\354\236\254\354\235\200.py" new file mode 100644 index 0000000..387a810 --- /dev/null +++ "b/study/baekjoon/week7/BOJ9461_\355\214\214\353\217\204\353\260\230_\354\210\230\354\227\264/BOJ9461_\355\214\214\353\217\204\353\260\230_\354\210\230\354\227\264_\354\213\244\353\262\2043_\354\241\260\354\236\254\354\235\200.py" @@ -0,0 +1,14 @@ +P = [0 for i in range(101)] # 1 <= N <= 100 + +P[1] = 1 +P[2] = 1 +P[3] = 1 + +# P[N] = P[N-3] + P[N-2] 규칙 성립 +for i in range(4, 100+1): + P[i] = P[i-3] + P[i-2] + +t = int(input()) +for _ in range(t): + n = int(input()) + print(P[n]) \ No newline at end of file