結果
問題 | No.1980 [Cherry 4th Tune D] 停止距離 |
ユーザー |
![]() |
提出日時 | 2023-05-20 14:46:20 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 1,408 ms / 3,000 ms |
コード長 | 611 bytes |
コンパイル時間 | 374 ms |
コンパイル使用メモリ | 82,260 KB |
実行使用メモリ | 89,680 KB |
最終ジャッジ日時 | 2024-10-01 10:42:30 |
合計ジャッジ時間 | 35,138 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 27 |
ソースコード
import sys input = sys.stdin.readline def f(T, m, L, V): V *= 10 return 36 * V * 20 * m * T * 100 + V * V * 10000 <= 36 * 36 * L * 20 * m * 10000 N = int(input()) for _ in range(N): T, m, L = input().split() a, b = T.split(".") T = int(a + b) a, b = m.split(".") m = int(a + b) a, b = L.split(".") L = int(a + b) yes = 0 no = 10 ** 18 while abs(yes - no) != 1: mid = (yes + no)//2 if f(T, m, L, mid): yes = mid else: no = mid low = yes % 100 yes //= 100 print("{0}.{1}".format(yes, str(low).zfill(2)))