結果

問題 No.1993 Horse Racing
ユーザー umezo
提出日時 2022-07-02 01:31:31
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 408 bytes
コンパイル時間 2,033 ms
コンパイル使用メモリ 194,308 KB
最終ジャッジ日時 2025-01-30 03:42:39
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define ALL(v) v.begin(),v.end()
typedef long long ll;
 
#include<bits/stdc++.h>
using namespace std;
 
int main(){
  ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  
  int n;
  cin>>n;
  vector<double> A(n-1);
  rep(i,n-1) cin>>A[i];
  double ans=1;
  rep(i,n-1) ans*=(1-A[i]/1000);
  ans=1-ans;
  ans*=1000;
  printf("%.10f\n",ans);
      
  return 0;
}
0