結果

問題 No.1980 [Cherry 4th Tune D] 停止距離
ユーザー pitPpitP
提出日時 2022-06-17 22:47:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 827 ms / 3,000 ms
コード長 644 bytes
コンパイル時間 356 ms
コンパイル使用メモリ 82,160 KB
実行使用メモリ 77,632 KB
最終ジャッジ日時 2024-04-17 15:08:49
合計ジャッジ時間 21,029 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
52,096 KB
testcase_01 AC 243 ms
76,516 KB
testcase_02 AC 604 ms
77,056 KB
testcase_03 AC 448 ms
77,408 KB
testcase_04 AC 206 ms
76,812 KB
testcase_05 AC 560 ms
76,672 KB
testcase_06 AC 781 ms
76,652 KB
testcase_07 AC 789 ms
77,440 KB
testcase_08 AC 827 ms
77,632 KB
testcase_09 AC 784 ms
77,184 KB
testcase_10 AC 766 ms
77,104 KB
testcase_11 AC 778 ms
76,928 KB
testcase_12 AC 787 ms
77,056 KB
testcase_13 AC 770 ms
76,416 KB
testcase_14 AC 782 ms
76,800 KB
testcase_15 AC 773 ms
77,152 KB
testcase_16 AC 769 ms
76,128 KB
testcase_17 AC 785 ms
76,112 KB
testcase_18 AC 773 ms
76,244 KB
testcase_19 AC 766 ms
76,184 KB
testcase_20 AC 771 ms
76,288 KB
testcase_21 AC 780 ms
76,288 KB
testcase_22 AC 791 ms
76,416 KB
testcase_23 AC 787 ms
76,444 KB
testcase_24 AC 775 ms
76,184 KB
testcase_25 AC 780 ms
76,608 KB
testcase_26 AC 42 ms
52,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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