結果
問題 |
No.2420 Simple Problem
|
ユーザー |
![]() |
提出日時 | 2023-08-12 14:20:02 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 342 bytes |
コンパイル時間 | 424 ms |
コンパイル使用メモリ | 81,712 KB |
実行使用メモリ | 83,468 KB |
最終ジャッジ日時 | 2024-11-19 18:35:14 |
合計ジャッジ時間 | 26,441 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 6 WA * 27 |
ソースコード
import sys input=sys.stdin.readline n = int(input()) for i in range(n): a, b = map(int, input().split()) c = a + b d = (a - b) ** 2 hi = 10 ** 5 lw = 0 while hi - lw > 1: mid = (hi + lw) // 2 if mid ** 4 - 2 * mid ** 2 * c + d > 0: hi = mid else: lw = mid print(hi)