結果
問題 | No.2420 Simple Problem |
ユーザー |
![]() |
提出日時 | 2023-08-19 06:37:22 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 719 ms / 2,000 ms |
コード長 | 255 bytes |
コンパイル時間 | 167 ms |
コンパイル使用メモリ | 82,448 KB |
実行使用メモリ | 79,280 KB |
最終ジャッジ日時 | 2024-11-28 20:52:48 |
合計ジャッジ時間 | 22,044 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 33 |
ソースコード
from math import sqrtN=int(input())for i in range(N):a,b=map(int,input().split())t=round(sqrt(a)+sqrt(b))for x in range(max(1,t-3),t+4):if 2*x*x*a+2*x*x*b<x*x*x*x+a*a+b*b-2*a*b:print(x)break