結果
| 問題 |
No.1807 UMA Gacha
|
| コンテスト | |
| ユーザー |
keisuke6
|
| 提出日時 | 2022-10-31 20:31:12 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 297 bytes |
| コンパイル時間 | 1,971 ms |
| コンパイル使用メモリ | 191,916 KB |
| 最終ジャッジ日時 | 2025-02-08 16:22:31 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 21 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
int N;
double p;
cin>>N>>p;
if(N >= 200){
cout<<1<<endl;
return 0;
}
double ans = 1;
for(int i=0;i<N;i++) ans *= (1-p);
cout<<fixed<<setprecision(15)<<1-ans<<endl;
}
keisuke6