結果
問題 | No.53 悪の漸化式 |
ユーザー |
![]() |
提出日時 | 2021-01-11 13:41:53 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 291 bytes |
コンパイル時間 | 2,275 ms |
コンパイル使用メモリ | 191,052 KB |
最終ジャッジ日時 | 2025-01-17 16:08:28 |
ジャッジサーバーID (参考情報) |
judge4 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
#include <bits/stdc++.h>using namespace std;int main() {int n;cin >> n;double ans;if (n == 0) {ans = 4;} else if (n == 1) {ans = 3;} else {ans = pow(3.0 / 4.0, n) * 4.0;}cout << fixed << setprecision(15) << ans << '\n';}