結果
| 問題 |
No.786 京都大学の過去問
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-04-19 08:22:46 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 308 bytes |
| コンパイル時間 | 2,106 ms |
| コンパイル使用メモリ | 158,192 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-22 11:21:24 |
| 合計ジャッジ時間 | 1,679 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 WA * 2 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ios::sync_with_stdio(false);
int n;
cin >> n;
int a[100];
a[1] = 1;
a[2] = 2;
for (int i = 3; i <= n; i++)
a[i] = a[i-1] + a[i-2];
cout << a[n] << endl;
return 0;
}