結果
| 問題 | No.1807 UMA Gacha |
| コンテスト | |
| ユーザー |
tnakao0123
|
| 提出日時 | 2022-01-15 19:17:19 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 419 bytes |
| 記録 | |
| コンパイル時間 | 2,780 ms |
| コンパイル使用メモリ | 45,772 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-21 22:28:13 |
| 合計ジャッジ時間 | 2,064 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 21 |
ソースコード
/* -*- coding: utf-8 -*-
*
* 1807.cc: No.1807 UMA Gacha - yukicoder
*/
#include<cstdio>
#include<cmath>
#include<algorithm>
using namespace std;
/* constant */
/* typedef */
/* global variables */
/* subroutines */
/* main */
int main() {
int n;
double p;
scanf("%d%lf", &n, &p);
if (n >= 200) puts("1");
else {
double q = 1.0 - pow(1.0 - p, n);
printf("%.10lf\n", q);
}
return 0;
}
tnakao0123