結果
| 問題 | No.786 京都大学の過去問 | 
| コンテスト | |
| ユーザー |  al1ce_nanka189r | 
| 提出日時 | 2019-02-11 13:15:16 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 28 ms / 2,000 ms | 
| コード長 | 460 bytes | 
| コンパイル時間 | 94 ms | 
| コンパイル使用メモリ | 12,672 KB | 
| 実行使用メモリ | 10,880 KB | 
| 最終ジャッジ日時 | 2024-07-18 08:24:02 | 
| 合計ジャッジ時間 | 735 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 5 | 
ソースコード
import math import sys from operator import itemgetter input = sys.stdin.readline # a = int(input().rstrip()) # a, b = map(int, input().rstrip().split()) # D = list(map(int, input().rstrip().split())) # H = [int(input().rstrip()) for _ in range(L)] # DD = [[0 for j in range(100)] for i in range(200)] # if __name__ == '__main__': N = int(input().rstrip()) dp = [0] * (N+1) dp[1] = 1 dp[2] = 2 for i in range(2, N): dp[i+1] = dp[i] + dp[i-1] print(dp[N])
