結果
問題 |
No.53 悪の漸化式
|
ユーザー |
![]() |
提出日時 | 2015-09-30 10:25:10 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 355 bytes |
コンパイル時間 | 1,932 ms |
コンパイル使用メモリ | 159,072 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-19 18:09:47 |
合計ジャッジ時間 | 1,735 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 WA * 4 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:17:18: warning: use of ‘ll’ length modifier with ‘f’ type character has either no effect or undefined behavior [-Wformat=] 17 | printf("%.9llf\n", A[N]); | ^
ソースコード
#include "bits/stdc++.h" using namespace std; #define REP(i, n) for(int i=0; i<(n); i++) #define FOR(i, a, b) for(int i=(a);i<(b);i++) int N; vector<long double> A(200); signed main() { cin >> N; A[0] = 4.0; A[1] = 3.0; FOR(i,2,N+1) { A[i] = (19 * A[i-1] - 12 * A[i-2]) / 4.0; } printf("%.9llf\n", A[N]); return 0; }