結果
問題 |
No.1993 Horse Racing
|
ユーザー |
![]() |
提出日時 | 2022-03-19 23:03:18 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 14 ms / 2,000 ms |
コード長 | 302 bytes |
コンパイル時間 | 571 ms |
コンパイル使用メモリ | 66,340 KB |
最終ジャッジ日時 | 2025-01-28 10:49:24 |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 23 |
ソースコード
#include <iostream> #define rep(i, l, n) for (int i = (l); i < (n); i++) using namespace std; int main(void) { int n; cin >> n; double m = 1000.0, d = 1000.0; double ans = 0; rep(i, 0, n - 1) { int a; cin >> a; ans += a * (d / m); d = 1000.0 - ans; } printf("%.9f\n", ans); return 0; }