結果

問題 No.1807 UMA Gacha
ユーザー nyuminyusupe
提出日時 2024-09-28 01:50:54
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 459 bytes
コンパイル時間 1,708 ms
コンパイル使用メモリ 166,864 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-28 01:50:57
合計ジャッジ時間 2,712 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
#define rep(i,n) for(int i=0; i< (n); i++)
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
const int mod = 998244353;
const int inf = (1<<30);
const ll INF = (1ull<<62);


int main(){
    int n; cin>>n;
    double  p; cin>>p;
    if(n>=200){
        cout<<1<<endl;
    }else{
        double x = 1;
        rep(i,n){
            x *= double(1-p);
        }
        cout<<fixed<<setprecision(10)<<1-x<<endl;

    }

}
0