結果
問題 | No.1993 Horse Racing |
ユーザー |
|
提出日時 | 2024-03-20 13:20:57 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 423 bytes |
コンパイル時間 | 4,279 ms |
コンパイル使用メモリ | 251,472 KB |
最終ジャッジ日時 | 2025-02-20 08:04:50 |
ジャッジサーバーID (参考情報) |
judge1 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 23 |
ソースコード
#include <bits/stdc++.h>#include <atcoder/all>using namespace std;using namespace atcoder;using ll = long long;int N, A[110];int main() {cin >> N;for (int i = 1; i <= N - 1; i++) cin >> A[i];double ans = 0, res = 1;for (int i = 1; i <= N - 1; i++) {res *= (double)(1000 - A[i]) / 1000;}ans = (double)1000 - (double)1000 * res;cout << fixed << setprecision(20) << ans << endl;return 0;}