結果
| 問題 |
No.786 京都大学の過去問
|
| コンテスト | |
| ユーザー |
ttttan
|
| 提出日時 | 2019-02-10 19:03:42 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 185 bytes |
| コンパイル時間 | 1,304 ms |
| コンパイル使用メモリ | 158,036 KB |
| 実行使用メモリ | 6,940 KB |
| 最終ジャッジ日時 | 2024-07-06 20:38:55 |
| 合計ジャッジ時間 | 1,889 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 WA * 2 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;cin>>n;
int dp[n+1];
dp[0]=1;dp[1]=1;
for(int i=2;i<=n;i++)dp[i]=dp[i-2]+dp[i-1];
cout<<dp[n]<<endl;
}
ttttan