結果
問題 |
No.44 DPなすごろく
|
ユーザー |
![]() |
提出日時 | 2017-09-16 12:49:08 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 307 bytes |
コンパイル時間 | 574 ms |
コンパイル使用メモリ | 70,608 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-08 00:45:00 |
合計ジャッジ時間 | 1,403 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 4 |
other | WA * 20 |
ソースコード
#include <iostream> #include <random> // #include <algorithm> #define INF 1000000000 using namespace std; #define int long long signed main(){ int N; int D[50]={1,1}; cin >> N; if(N<=2){ cout << "1" << endl; } for(int i=2;i<N;i++){ D[i]=D[i-1]+D[i-2]; } cout << D[N] << endl; }