結果
| 問題 | No.2420 Simple Problem |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-09-08 04:15:50 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 287 bytes |
| 記録 | |
| コンパイル時間 | 331 ms |
| コンパイル使用メモリ | 20,700 KB |
| 実行使用メモリ | 38,564 KB |
| 最終ジャッジ日時 | 2026-03-12 07:54:12 |
| 合計ジャッジ時間 | 89,200 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 3 WA * 1 TLE * 29 |
ソースコード
n = int(input())
for i in range(n):
a, b = map(int, input().split())
l = 0
r = 1e7
while l < r :
x = (l + r) // 2
d = x * x - a - b
if 4 * a * b < d * d and x * x > a + b:
r = x
else:
l = x + 1
print(int(l))