結果

問題 No.1980 [Cherry 4th Tune D] 停止距離
コンテスト
ユーザー rlangevin
提出日時 2023-05-20 14:46:20
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 994 ms / 3,000 ms
コード長 611 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 265 ms
コンパイル使用メモリ 85,248 KB
実行使用メモリ 93,176 KB
最終ジャッジ日時 2026-04-17 11:45:44
合計ジャッジ時間 28,057 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import sys
input = sys.stdin.readline

def f(T, m, L, V):
    V *= 10
    return 36 * V * 20 * m * T * 100 + V * V * 10000 <= 36 * 36 * L * 20 * m * 10000

N = int(input())
for _ in range(N):
    T, m, L = input().split()
    a, b = T.split(".")
    T = int(a + b)
    a, b = m.split(".")
    m = int(a + b)
    a, b = L.split(".")
    L = int(a + b)
    yes = 0
    no = 10 ** 18
    while abs(yes - no) != 1:
        mid = (yes + no)//2
        if f(T, m, L, mid):
            yes = mid
        else:
            no = mid
    low = yes % 100
    yes //= 100
    print("{0}.{1}".format(yes, str(low).zfill(2)))
0