結果

問題 No.813 ユキちゃんの冒険
ユーザー kotatsugame
提出日時 2020-03-07 03:59:31
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 229 bytes
コンパイル時間 667 ms
コンパイル使用メモリ 65,152 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2025-01-02 07:34:43
合計ジャッジ時間 1,547 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10 WA * 16
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:6:1: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
    6 | main()
      | ^~~~

ソースコード

diff #

#include<iostream>
#include<iomanip>
using namespace std;
int N;
double p,q;
main()
{
	cin>>N>>p>>q;
	double now=p;
	for(int i=N-1;i--;)
	{
		now=p+(q<1e-10?0:q*q*now/(1-now*now));
	}
	cout<<fixed<<setprecision(15)<<now<<endl;
}
0