結果
| 問題 |
No.786 京都大学の過去問
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-05-26 14:31:27 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 359 bytes |
| コンパイル時間 | 605 ms |
| コンパイル使用メモリ | 54,652 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-17 15:13:12 |
| 合計ジャッジ時間 | 992 ms |
|
ジャッジサーバーID (参考情報) |
judge6 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 WA * 2 |
ソースコード
/*
* 786_sample.cpp
*
* No.786 sw̉ߋ
*/
#include <iostream>
#define MAX 50
int main () {
// Ki̐
auto n = 0;
// W͓ǂݍ
std::cin >> n;
int x[MAX] = {};
x[0] = 1;
x[1] = 2;
// 3iڈȏ
for (auto i = 2; i < n; i++) {
x[i] = x[i-2] + x[i-1];
}
std::cout << x[n-1] << std::endl;
return 0;
}