結果

問題 No.1980 [Cherry 4th Tune D] 停止距離
ユーザー lilictakalilictaka
提出日時 2022-06-18 00:31:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 345 ms / 3,000 ms
コード長 532 bytes
コンパイル時間 130 ms
コンパイル使用メモリ 82,368 KB
実行使用メモリ 89,652 KB
最終ジャッジ日時 2024-04-17 17:00:14
合計ジャッジ時間 10,299 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
53,052 KB
testcase_01 AC 124 ms
78,460 KB
testcase_02 AC 252 ms
84,792 KB
testcase_03 AC 204 ms
81,836 KB
testcase_04 AC 110 ms
78,048 KB
testcase_05 AC 223 ms
83,892 KB
testcase_06 AC 333 ms
88,912 KB
testcase_07 AC 327 ms
89,136 KB
testcase_08 AC 317 ms
89,284 KB
testcase_09 AC 333 ms
89,140 KB
testcase_10 AC 319 ms
89,292 KB
testcase_11 AC 345 ms
88,760 KB
testcase_12 AC 316 ms
89,276 KB
testcase_13 AC 318 ms
89,284 KB
testcase_14 AC 336 ms
89,652 KB
testcase_15 AC 321 ms
89,152 KB
testcase_16 AC 330 ms
88,928 KB
testcase_17 AC 338 ms
89,180 KB
testcase_18 AC 334 ms
88,324 KB
testcase_19 AC 332 ms
88,840 KB
testcase_20 AC 335 ms
88,928 KB
testcase_21 AC 339 ms
88,928 KB
testcase_22 AC 326 ms
88,920 KB
testcase_23 AC 330 ms
88,388 KB
testcase_24 AC 328 ms
88,800 KB
testcase_25 AC 330 ms
88,944 KB
testcase_26 AC 32 ms
52,612 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
def isok(v,T,u,L):
    if 25 * (v ** 2)  +18 * u*T*v -20 * u * L * (18 ** 2) <= 0:
        return True
    else:
        return False
def solve(T,u,L):
    ok = 0
    ng = 5101 * 10 ** 2 
    while ng -ok > 1:
        v = (ng+ok) //2
        if isok(v,T,u,L):
            ok = v
        else:
            ng = v
    v = ok / 10 ** 2
    return v

ANS = []
for _ in range(N):
    T,u,L = map(lambda x:int(x[:-3] + x[-2:]),input().split())
    ANS.append(solve(T,u,L))
for ans in ANS:
    print('{:.2f}'.format(ans))
0