結果
問題 | No.53 悪の漸化式 |
ユーザー |
![]() |
提出日時 | 2017-05-16 09:47:02 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 372 bytes |
コンパイル時間 | 1,434 ms |
コンパイル使用メモリ | 159,024 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-16 16:11:23 |
合計ジャッジ時間 | 2,154 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge6 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
#include"bits/stdc++.h" //#include<bits/stdc++.h> using namespace std; #define print(x) cout<<x<<endl; #define rep(i,a,b) for(int i=a;i<b;i++) typedef long long ll; const ll mod = 2000000; #define pi 3.141592 int main() { int n; cin >> n; double a[102] = {}; a[0] = 4.0, a[1] = 3.0; rep(i, 2, n+1) { a[i] = 4*pow(0.75,i); } printf("%.10f\n", a[n]); return 0; }