結果

問題 No.2420 Simple Problem
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2023-08-12 14:04:06
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 848 ms / 2,000 ms
コード長 284 bytes
コンパイル時間 159 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 78,956 KB
最終ジャッジ日時 2024-04-30 04:54:34
合計ジャッジ時間 25,953 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
51,968 KB
testcase_01 AC 428 ms
78,248 KB
testcase_02 AC 80 ms
69,020 KB
testcase_03 AC 241 ms
78,080 KB
testcase_04 AC 670 ms
78,308 KB
testcase_05 AC 473 ms
78,060 KB
testcase_06 AC 806 ms
78,044 KB
testcase_07 AC 822 ms
78,444 KB
testcase_08 AC 820 ms
78,000 KB
testcase_09 AC 848 ms
78,696 KB
testcase_10 AC 807 ms
78,604 KB
testcase_11 AC 805 ms
78,056 KB
testcase_12 AC 813 ms
78,940 KB
testcase_13 AC 807 ms
78,424 KB
testcase_14 AC 807 ms
78,084 KB
testcase_15 AC 824 ms
78,908 KB
testcase_16 AC 805 ms
78,316 KB
testcase_17 AC 815 ms
78,408 KB
testcase_18 AC 817 ms
78,576 KB
testcase_19 AC 828 ms
78,788 KB
testcase_20 AC 818 ms
78,308 KB
testcase_21 AC 817 ms
77,640 KB
testcase_22 AC 808 ms
78,472 KB
testcase_23 AC 826 ms
78,956 KB
testcase_24 AC 802 ms
78,772 KB
testcase_25 AC 829 ms
78,540 KB
testcase_26 AC 41 ms
52,864 KB
testcase_27 AC 641 ms
77,516 KB
testcase_28 AC 632 ms
77,184 KB
testcase_29 AC 639 ms
77,420 KB
testcase_30 AC 630 ms
77,568 KB
testcase_31 AC 629 ms
77,568 KB
testcase_32 AC 40 ms
52,224 KB
testcase_33 AC 412 ms
78,432 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def f(a,b,x):

    return 4*a*b < x**4 - 2*(x**2*(a+b)) + (a+b)**2
n = int(input())
for _ in range(n):
    a,b = map(int,input().split())

    base = int(a**0.5+b**0.5)
    for i in range(base,base+5):
        if f(a,b,i):
            print(i)
            break
        
            
0