結果
問題 |
No.1993 Horse Racing
|
ユーザー |
![]() |
提出日時 | 2024-12-01 13:37:36 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 343 bytes |
コンパイル時間 | 1,925 ms |
コンパイル使用メモリ | 194,992 KB |
最終ジャッジ日時 | 2025-02-26 09:58:12 |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 23 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; vector<int> a(n - 1); for(auto& x : a){ cin >> x; } double d = 1000.0, m = 1000.0; double ans = 0; for(auto& x : a){ ans += x * (d / m); d = m - ans; } cout << setprecision(16) << ans << endl; return 0; }