結果

問題 No.1980 [Cherry 4th Tune D] 停止距離
ユーザー tktk_snsntktk_snsn
提出日時 2022-06-17 22:12:55
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 510 bytes
コンパイル時間 363 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 77,440 KB
最終ジャッジ日時 2024-04-17 14:14:38
合計ジャッジ時間 25,752 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
52,096 KB
testcase_01 AC 254 ms
77,056 KB
testcase_02 AC 710 ms
77,056 KB
testcase_03 WA -
testcase_04 AC 202 ms
76,908 KB
testcase_05 AC 641 ms
76,928 KB
testcase_06 AC 963 ms
76,960 KB
testcase_07 AC 964 ms
77,264 KB
testcase_08 AC 1,015 ms
77,184 KB
testcase_09 AC 1,010 ms
77,184 KB
testcase_10 AC 965 ms
76,984 KB
testcase_11 AC 951 ms
76,988 KB
testcase_12 AC 986 ms
77,184 KB
testcase_13 AC 999 ms
77,284 KB
testcase_14 AC 989 ms
77,408 KB
testcase_15 AC 972 ms
76,928 KB
testcase_16 AC 1,018 ms
77,184 KB
testcase_17 AC 993 ms
76,972 KB
testcase_18 AC 1,009 ms
77,428 KB
testcase_19 AC 997 ms
77,312 KB
testcase_20 AC 966 ms
77,056 KB
testcase_21 AC 975 ms
77,184 KB
testcase_22 AC 1,025 ms
77,080 KB
testcase_23 AC 979 ms
77,372 KB
testcase_24 AC 1,018 ms
77,440 KB
testcase_25 AC 1,052 ms
76,928 KB
testcase_26 AC 41 ms
52,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def S(v, t, m):
    return v * t + v * v / 20 / m


def main():
    T, mu, L = map(float, input().split())

    l = 0.
    r = 100000. * 3.6
    for _ in range(200):
        if abs(r - l) < 1e-9:
            break
        f = (l + r) * 0.5
        if S(f, T, mu) > L:
            r = f
        else:
            l = f

    ans = str(r * 3.6)
    if "." in ans:
        dot = ans.index(".")
        print(ans[:dot+3])
    else:
        print(ans, "00", sep=".")


T = int(input())
for _ in range(T):
    main()
0