結果

問題 No.1980 [Cherry 4th Tune D] 停止距離
ユーザー ygd.ygd.
提出日時 2022-06-17 21:47:46
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 1,249 bytes
コンパイル時間 369 ms
コンパイル使用メモリ 82,536 KB
実行使用メモリ 77,372 KB
最終ジャッジ日時 2024-04-17 13:28:55
合計ジャッジ時間 10,184 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
52,096 KB
testcase_01 AC 109 ms
76,132 KB
testcase_02 WA -
testcase_03 AC 212 ms
76,928 KB
testcase_04 AC 93 ms
76,160 KB
testcase_05 AC 243 ms
77,104 KB
testcase_06 AC 281 ms
76,872 KB
testcase_07 AC 283 ms
76,800 KB
testcase_08 AC 338 ms
76,928 KB
testcase_09 AC 284 ms
76,652 KB
testcase_10 WA -
testcase_11 AC 284 ms
77,024 KB
testcase_12 AC 339 ms
77,312 KB
testcase_13 WA -
testcase_14 AC 336 ms
77,056 KB
testcase_15 AC 337 ms
77,184 KB
testcase_16 AC 278 ms
76,576 KB
testcase_17 AC 279 ms
76,544 KB
testcase_18 AC 282 ms
76,504 KB
testcase_19 AC 278 ms
76,544 KB
testcase_20 AC 277 ms
76,672 KB
testcase_21 AC 279 ms
76,544 KB
testcase_22 WA -
testcase_23 AC 315 ms
76,524 KB
testcase_24 AC 313 ms
76,604 KB
testcase_25 AC 278 ms
76,544 KB
testcase_26 AC 36 ms
52,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
#input = sys.stdin.readline
input = sys.stdin.buffer.readline #文字列はダメ
#sys.setrecursionlimit(1000000)
#import bisect
#import itertools
#import random
#from heapq import heapify, heappop, heappush
#from collections import defaultdict 
#from collections import deque
#import copy
#import math
#from functools import lru_cache
#@lru_cache(maxsize=None)
MOD = pow(10,9) + 7
#MOD = 998244353
#dx = [1,0,-1,0]
#dy = [0,1,0,-1]
#dx8 = [1,1,0,-1,-1,-1,0,1]
#dy8 = [0,1,1,1,0,-1,-1,-1]

def hantei(x,T,m,L):
    # val = v**2 + 20*m*T*v - 20*m*L
    val = x**2 + 7200*m*T*x - 20*360*360*m*L
    return val <= 0


def main():
    N = int(input())
    for _ in range(N):
        T,m,L = map(float,input().split())
        # xの最大値と最小値。答えはこれを100で割る
        ng = pow(10,9)
        ok = 0
        while abs(ok-ng) > 1:
            mid = (ok+ng)//2
            if hantei(mid,T,m,L):
                ok = mid
            else:
                ng = mid
        ok = str(ok)
        if len(ok) == 1:
            ans = '0.0' + str(ok)
        elif len(ok) == 2:
            ans = '0.' + str(ok)
        else:
            ans = ok[:-2] + '.' + ok[-2:]
        print(ans)




if __name__ == '__main__':
    main()
0