結果
問題 | No.2420 Simple Problem |
ユーザー |
![]() |
提出日時 | 2023-08-12 14:29:19 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 756 ms / 2,000 ms |
コード長 | 443 bytes |
コンパイル時間 | 328 ms |
コンパイル使用メモリ | 82,252 KB |
実行使用メモリ | 82,204 KB |
最終ジャッジ日時 | 2024-11-19 19:44:57 |
合計ジャッジ時間 | 24,262 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 33 |
ソースコード
import sysinput=sys.stdin.readlinen = int(input())for i in range(n):a, b = map(int, input().split())assert a > 0 and b > 0c = a + bd = (a - b) ** 2hi = 63246lw = 0while hi - lw > 1:mid = (hi + lw) // 2if mid ** 2 - c <= 0:lw = midcontinueif mid ** 4 - (2 * (mid ** 2) * c) + d > 0:hi = midelse:lw = midprint(hi)