結果

問題 No.1807 UMA Gacha
ユーザー pengin_2000
提出日時 2022-01-16 14:26:05
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 218 bytes
コンパイル時間 267 ms
コンパイル使用メモリ 29,184 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-23 10:23:53
合計ジャッジ時間 1,384 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<stdio.h>
int main()
{
	int n;
	double p;
	scanf("%d%lf", &n, &p);
	int i;
	double ans = 1;
	if (n < 200)
	{
		for (i = 0; i < n; i++)
			ans *= 1 - p;
		ans = 1 - ans;
	}
	printf("%.20lf\n", ans);
	return 0;
}
0