結果

問題 No.1980 [Cherry 4th Tune D] 停止距離
ユーザー Akijin_007Akijin_007
提出日時 2022-06-17 21:52:14
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 823 bytes
コンパイル時間 332 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 98,760 KB
最終ジャッジ日時 2024-04-17 13:36:59
合計ジャッジ時間 14,490 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 37 ms
51,840 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#int(input())
#map(int, input().split())
#list(map(int, input().split()))

N = int(input())

T = [0] * N
for i in range(N):
    T[i] = list(map(float, input().split()))
#     T[i] = input().split()

# for i in range(N):
#     for j in range(3):
#         s = T[i][j]
#         T[i][j] = int(s[:-3]) * 100 + int(s[-2:]) * 1

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

# print(T)

for i in range(N):
    t = T[i][0]
    m = T[i][1]
    l = T[i][2]

    vmax = 5200
    vmin = 0

    while vmax - vmin > 0.001:
        h = (vmax + vmin) / 2
        if S(h, t, m) > l:
            vmax = h
        else:
            vmin = h

    print(format(int(vmin*100)/100, ".2f"))


#     # print(vmin)

#     a, b = divmod(vmin, 10)
#     c, d = divmod(a, 100)
#     print(str(c) + "." + format(d, "02d"))


0