結果
| 問題 |
No.53 悪の漸化式
|
| コンテスト | |
| ユーザー |
not_522
|
| 提出日時 | 2015-08-17 11:31:28 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 257 bytes |
| コンパイル時間 | 1,314 ms |
| コンパイル使用メモリ | 161,716 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-18 10:00:40 |
| 合計ジャッジ時間 | 2,084 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 14 WA * 6 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<double> a{4, 3};
a.resize(n + 1);
for (int i = 2; i <= n; ++i) a[i] = (19 * a[i - 1] - 12 * a[i - 2]) / 4;
cout << fixed << setprecision(15) << a[n] << endl;
}
not_522