結果

問題 No.1807 UMA Gacha
ユーザー V_Melville
提出日時 2022-01-14 22:59:30
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 276 bytes
コンパイル時間 2,728 ms
コンパイル使用メモリ 241,744 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-20 13:35:58
合計ジャッジ時間 3,601 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)

using std::cin;
using std::cout;

int main() {
	int n;
	double p;
	cin >> n >> p;
	
	if (n >= 200) {
		puts("1");
		return 0;
	}
	
	double ans = 1 - pow(1-p, n);
	printf("%.10lf\n", ans);
	
	return 0;
}
0