結果

問題 No.53 悪の漸化式
ユーザー srup٩(๑`н´๑)۶
提出日時 2016-08-11 19:08:33
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 244 bytes
コンパイル時間 478 ms
コンパイル使用メモリ 57,692 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-07 11:01:15
合計ジャッジ時間 1,181 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;

int main(void){
	double n; cin >> n;
	//3項間漸化式を解いて、一般項を求めた
	double ans = 4 * pow(3.0 / 4.0, n);
	printf("%.10f\n", ans);
	return 0;
}
0