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?

謎のプログラムの墓場

Last updated at Posted at 2025-04-14

謎プログラムの墓場

Atcoderを解いている最中に生み出された謎のプログラムを奉納する場所

良く忘れること

a = ++i 
// 演算 -> aに代入
b = i++ 
// bに代入 -> 演算

メモ化メモリ最小フィボナッチ(笑)

def fibonacci():
  memo =[0]*2
  memo[0] = 1
  memo[1] = 1
  
  for _ in range(N-K+1-2):
    m = memo.pop(0) + memo[0]
    memo.insert(1, m)
    print(memo)

  return memo[-1]
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?