結果
問題 |
No.1807 UMA Gacha
|
ユーザー |
![]() |
提出日時 | 2022-01-14 21:26:30 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 311 bytes |
コンパイル時間 | 680 ms |
コンパイル使用メモリ | 70,356 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-20 07:47:15 |
合計ジャッジ時間 | 1,455 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 21 |
ソースコード
#include <iostream> #include <iomanip> using namespace std; int main() { int n; double p; cin >> n >> p; if(n >= 200){ cout << 1 << endl; return 0; } double q = 1; for(int i = 0; i < n; i++) q = q * (1 - p); cout << fixed << setprecision(15) << 1 - q << endl; }