結果
問題 |
No.1807 UMA Gacha
|
ユーザー |
![]() |
提出日時 | 2022-01-14 21:23:44 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 340 bytes |
コンパイル時間 | 1,864 ms |
コンパイル使用メモリ | 192,828 KB |
最終ジャッジ日時 | 2025-01-27 10:51:29 |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 21 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main() { int N; long double P; cin >> N >> P; if(N >= 200) { cout << 1 << endl; } else { long double ans = 1; for(int i = 0; i < N; i++) { ans *= 1-P; } cout << fixed << setprecision(18) << 1-ans << endl; } }