0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

paizaラーニング『フィボナッチ数』

Last updated at Posted at 2022-12-27

解らなかったです。。。

解答例

N = int(input())

fibo = [0] * N
fibo[0] = 0
fibo[1] = 1

for i in range(2, N):
    fibo[i] = fibo[i - 2] + fibo[i - 1]

for ele in fibo:
    print(ele)
0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?