結果

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int main(){
  cout << fixed << setprecision(20);
  int N;
  cin >> N;
  vector<int> A(N - 1);
  for (int i = 0; i < N - 1; i++){
    cin >> A[i];
  }
  double ans = 1000;
  for (int i = 0; i < N - 1; i++){
    ans *= 1000 - A[i];
    ans /= 1000;
  }
  cout << 1000 - ans << endl;
}
0