結果
問題 | No.53 悪の漸化式 |
ユーザー |
|
提出日時 | 2015-05-10 07:07:55 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 303 bytes |
コンパイル時間 | 1,012 ms |
コンパイル使用メモリ | 157,192 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-05 21:22:38 |
合計ジャッジ時間 | 1,638 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 WA * 6 |
ソースコード
#include "bits/stdc++.h" using namespace std; typedef long long Int; #define REP(i,n) for(int (i)=0;(i)<(int)(n);++(i)) double A[101]; int main() { A[0] = 4; A[1] = 3; for (int i = 2; i <= 100; i++) { A[i] = (19 * A[i - 1] - 12 * A[i - 2] ) / 4; } int n; cin >> n; printf("%.22f\n", A[n]); }