結果
| 問題 |
No.813 ユキちゃんの冒険
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-03-07 04:15:11 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 233 bytes |
| コンパイル時間 | 1,546 ms |
| コンパイル使用メモリ | 66,184 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2025-01-02 07:34:37 |
| 合計ジャッジ時間 | 2,028 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 WA * 16 |
コンパイルメッセージ
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+(now>1-1e-10?0:q*q*now/(1-now*now));
}
cout<<fixed<<setprecision(15)<<now<<endl;
}