結果

問題 No.1993 Horse Racing
ユーザー MasKoaTS
提出日時 2022-03-19 21:48:40
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 277 bytes
コンパイル時間 991 ms
コンパイル使用メモリ 67,040 KB
最終ジャッジ日時 2025-01-28 10:49:14
ジャッジサーバーID
(参考情報)
judge1 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#define rep(i, l, n) for (int i = (l); i < (n); i++)
using namespace std;

int main(void) {
	int n;	cin >> n;

	double p = 1.0;
	double m = 1000.0;
	rep(i, 0, n - 1) {
		double a;	cin >> a;
		p *= (m - a) / m;
	}
	printf("%.9f\n", m - m * p);

	return 0;
}
0