結果

問題 No.1980 [Cherry 4th Tune D] 停止距離
コンテスト
ユーザー pitP
提出日時 2022-06-17 22:47:54
言語 PyPy3
(8.0.0 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 819 ms / 3,000 ms
+ 883µs
コード長 644 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 86 ms
コンパイル使用メモリ 64,384 KB
実行使用メモリ 61,912 KB
最終ジャッジ日時 2026-10-20 05:39:21
合計ジャッジ時間 27,173 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

n = int(input())

for _ in range(n):
    t,mu,l = map(str,input().split())
    t100 = int(t.replace(".",""))
    mu100 = int(mu.replace(".",""))
    l100 = int(l.replace(".",""))
    ok = 510001
    ng = -1
    target = 36 * 36 * 10 * mu100 * l100
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if target < 36 * mu100 * t100 * mid + 50 * mid ** 2:
            ok = mid
        else:
            ng = mid
    moji = str(ng/100) + "0"*10
    if 0 <= ng/100 < 10:
        print(moji[:4])
    elif 10 <= ng/100 < 100:
        print(moji[:5])
    elif 100 <= ng/100 < 1000:
        print(moji[:6])
    else:
        print(moji[:7])
0