結果

問題 No.1980 [Cherry 4th Tune D] 停止距離
ユーザー legosukelegosuke
提出日時 2022-06-17 23:13:33
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 691 ms / 3,000 ms
コード長 452 bytes
コンパイル時間 2,100 ms
コンパイル使用メモリ 194,728 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-17 15:36:52
合計ジャッジ時間 18,896 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 112 ms
5,376 KB
testcase_02 AC 461 ms
5,376 KB
testcase_03 AC 314 ms
5,376 KB
testcase_04 AC 81 ms
5,376 KB
testcase_05 AC 403 ms
5,376 KB
testcase_06 AC 639 ms
5,376 KB
testcase_07 AC 633 ms
5,376 KB
testcase_08 AC 650 ms
5,376 KB
testcase_09 AC 627 ms
5,376 KB
testcase_10 AC 630 ms
5,376 KB
testcase_11 AC 665 ms
5,376 KB
testcase_12 AC 658 ms
5,376 KB
testcase_13 AC 667 ms
5,376 KB
testcase_14 AC 650 ms
5,376 KB
testcase_15 AC 643 ms
5,376 KB
testcase_16 AC 657 ms
5,376 KB
testcase_17 AC 691 ms
5,376 KB
testcase_18 AC 679 ms
5,376 KB
testcase_19 AC 654 ms
5,376 KB
testcase_20 AC 652 ms
5,376 KB
testcase_21 AC 645 ms
5,376 KB
testcase_22 AC 667 ms
5,376 KB
testcase_23 AC 668 ms
5,376 KB
testcase_24 AC 666 ms
5,376 KB
testcase_25 AC 654 ms
5,376 KB
testcase_26 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

using D = long double;
const D EPS = 1e-10;

D f(D T, D mu, D L) {
    D V = 3.6 * (sqrt(100 * mu * mu * T * T + 20 * mu * L) - 10.0 * mu * T);
    if (abs(V) < EPS) V = 0;
    return V;
}

int main() {
    int N;
    cin >> N;
    for (int i = 0; i < N; ++i) {
        D T, mu, L;
        cin >> T >> mu >> L;
        cout << fixed << setprecision(2) << (int)(f(T, mu, L) * 100) / 100.0 << endl;
    }
}
0