結果

問題 No.1980 [Cherry 4th Tune D] 停止距離
ユーザー 👑 rin204rin204
提出日時 2022-06-24 16:06:07
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 769 ms / 3,000 ms
コード長 479 bytes
コンパイル時間 604 ms
コンパイル使用メモリ 82,540 KB
実行使用メモリ 77,788 KB
最終ジャッジ日時 2024-04-25 21:51:47
合計ジャッジ時間 20,504 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
51,880 KB
testcase_01 AC 200 ms
76,968 KB
testcase_02 AC 547 ms
77,292 KB
testcase_03 AC 406 ms
77,420 KB
testcase_04 AC 175 ms
76,940 KB
testcase_05 AC 498 ms
76,816 KB
testcase_06 AC 709 ms
76,932 KB
testcase_07 AC 739 ms
76,948 KB
testcase_08 AC 706 ms
76,932 KB
testcase_09 AC 723 ms
77,164 KB
testcase_10 AC 720 ms
77,024 KB
testcase_11 AC 709 ms
76,980 KB
testcase_12 AC 696 ms
77,292 KB
testcase_13 AC 724 ms
77,204 KB
testcase_14 AC 707 ms
77,416 KB
testcase_15 AC 724 ms
77,368 KB
testcase_16 AC 713 ms
77,004 KB
testcase_17 AC 707 ms
77,480 KB
testcase_18 AC 716 ms
77,520 KB
testcase_19 AC 711 ms
77,328 KB
testcase_20 AC 746 ms
77,644 KB
testcase_21 AC 769 ms
77,736 KB
testcase_22 AC 683 ms
77,460 KB
testcase_23 AC 689 ms
77,480 KB
testcase_24 AC 684 ms
77,788 KB
testcase_25 AC 716 ms
77,316 KB
testcase_26 AC 36 ms
53,360 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    t, m, L = map(float, input().split())
    t = int(100 * t + 0.0001)
    m = int(100 * m + 0.0001)
    L = int(100 * L + 0.0001)
    l = 0
    r = 510001
    
    f = lambda x:18*m*x*t + 25*x*x <= 18*18*20*m*L


    while r - l > 1:
        mid = (l + r) // 2
        if f(mid):
            l = mid
        else:
            r = mid

    a = l // 100
    b = l - 100 * a
    ans = "{}.{:0>2}".format(a, b)
    print(ans)

for _ in range(int(input())):
    solve()
0