結果

問題 No.1980 [Cherry 4th Tune D] 停止距離
ユーザー titiatitia
提出日時 2023-05-25 01:34:44
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 628 ms / 3,000 ms
コード長 451 bytes
コンパイル時間 459 ms
コンパイル使用メモリ 87,540 KB
実行使用メモリ 80,040 KB
最終ジャッジ日時 2023-08-25 15:41:39
合計ジャッジ時間 18,782 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,252 KB
testcase_01 AC 223 ms
77,732 KB
testcase_02 AC 466 ms
78,928 KB
testcase_03 AC 354 ms
78,672 KB
testcase_04 AC 175 ms
77,704 KB
testcase_05 AC 428 ms
78,724 KB
testcase_06 AC 595 ms
79,672 KB
testcase_07 AC 604 ms
79,584 KB
testcase_08 AC 604 ms
79,704 KB
testcase_09 AC 591 ms
79,656 KB
testcase_10 AC 600 ms
79,792 KB
testcase_11 AC 599 ms
80,040 KB
testcase_12 AC 610 ms
79,624 KB
testcase_13 AC 589 ms
79,692 KB
testcase_14 AC 594 ms
79,632 KB
testcase_15 AC 600 ms
79,844 KB
testcase_16 AC 628 ms
79,064 KB
testcase_17 AC 590 ms
79,380 KB
testcase_18 AC 607 ms
79,412 KB
testcase_19 AC 588 ms
79,068 KB
testcase_20 AC 604 ms
78,848 KB
testcase_21 AC 625 ms
78,756 KB
testcase_22 AC 583 ms
79,084 KB
testcase_23 AC 610 ms
78,832 KB
testcase_24 AC 618 ms
79,028 KB
testcase_25 AC 597 ms
78,936 KB
testcase_26 AC 72 ms
71,192 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

def calc(v,t,m):
    return v*t+v*v/(20*m)


eps=10**(-10)
T0=int(input())
for tests in range(T0):
    T,mu,L=map(float,input().split())

    OK=0
    NG=1<<60

    for tests in range(100):
        mid=(OK+NG)/2

        if calc(mid,T,mu)>L+eps:
            NG=mid
        else:
            OK=mid

    ANS=str(int(OK*360))

    while len(ANS)<3:
        ANS="0"+ANS

    print(ANS[:-2]+"."+ANS[-2:])

    
    
0