結果
問題 | No.813 ユキちゃんの冒険 |
ユーザー |
|
提出日時 | 2020-03-07 04:21:54 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 229 bytes |
コンパイル時間 | 541 ms |
コンパイル使用メモリ | 69,636 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-21 08:33:42 |
合計ジャッジ時間 | 1,431 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 26 |
コンパイルメッセージ
main.cpp:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 6 | main() | ^~~~
ソースコード
#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*q*now/(1-now*p);}cout<<fixed<<setprecision(15)<<(p>1-1e-10?1:now)<<endl;}