結果
| 問題 | No.1807 UMA Gacha |
| コンテスト | |
| ユーザー |
ぷら
|
| 提出日時 | 2022-01-14 21:23:44 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 340 bytes |
| 記録 | |
| コンパイル時間 | 1,195 ms |
| コンパイル使用メモリ | 209,408 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-24 23:59:52 |
| 合計ジャッジ時間 | 2,262 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
}
}
ぷら