結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
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 42 ms
52,608 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, l):
#     v *= 1000 / 3600
#     return (v * t * 20 * m) + (v * v) - (l * 20 * m)
# print(S(57.26, 0.75, 0.70, 30.00))
# print(S(5726, 75, 0.70, 3000))

# # print(T)

# for i in range(N):
#     t = T[i][0]
#     m = T[i][1]/100
#     l = T[i][2]
#     # print(t, m, l)

#     vmax = 520000
#     vmin = 0

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

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

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

N = int(input())

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

def S(v, t, m, l):
    v *= 1000 / 3600
    return v * t * 20 * m + v * v - l * 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.00001:
        h = (vmax + vmin) / 2
        if S(h, t, m, l) > 0:
            vmax = h
        else:
            vmin = h

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