結果

問題 No.1993 Horse Racing
ユーザー みここ
提出日時 2022-07-01 21:28:17
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 345 bytes
コンパイル時間 740 ms
コンパイル使用メモリ 69,248 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-26 03:49:06
合計ジャッジ時間 1,497 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <iomanip>
using namespace std;

int main()
{
    int n;
    cin >> n;
    double a[105];
    for(int i = 0; i < n - 1; i++)
    {
        cin >> a[i];
    }
    double s = 1000;
    for(int i = 0; i < n - 1; i++)
    {
        s -= a[i] * s / 1000;
    }
    cout << fixed << setprecision(15) << 1000 - s << endl;
}
0