結果

問題 No.2420 Simple Problem
ユーザー hiryuNhiryuN
提出日時 2023-08-12 14:18:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,386 ms / 2,000 ms
コード長 298 bytes
コンパイル時間 343 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 76,068 KB
最終ジャッジ日時 2023-11-24 20:01:44
合計ジャッジ時間 45,713 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,460 KB
testcase_01 AC 607 ms
75,936 KB
testcase_02 AC 72 ms
72,992 KB
testcase_03 AC 264 ms
75,936 KB
testcase_04 AC 1,120 ms
76,064 KB
testcase_05 AC 720 ms
75,936 KB
testcase_06 AC 1,334 ms
76,064 KB
testcase_07 AC 1,351 ms
76,064 KB
testcase_08 AC 1,376 ms
76,064 KB
testcase_09 AC 1,348 ms
76,064 KB
testcase_10 AC 1,378 ms
76,068 KB
testcase_11 AC 1,378 ms
76,064 KB
testcase_12 AC 1,386 ms
76,068 KB
testcase_13 AC 1,342 ms
76,064 KB
testcase_14 AC 1,362 ms
76,068 KB
testcase_15 AC 1,379 ms
76,064 KB
testcase_16 AC 1,380 ms
76,064 KB
testcase_17 AC 1,375 ms
76,064 KB
testcase_18 AC 1,345 ms
76,064 KB
testcase_19 AC 1,382 ms
76,064 KB
testcase_20 AC 1,372 ms
76,068 KB
testcase_21 AC 1,331 ms
76,064 KB
testcase_22 AC 1,380 ms
76,064 KB
testcase_23 AC 1,348 ms
76,064 KB
testcase_24 AC 1,370 ms
76,064 KB
testcase_25 AC 1,384 ms
76,068 KB
testcase_26 AC 44 ms
61,856 KB
testcase_27 AC 1,095 ms
76,064 KB
testcase_28 AC 1,123 ms
76,064 KB
testcase_29 AC 1,123 ms
76,068 KB
testcase_30 AC 1,090 ms
75,936 KB
testcase_31 AC 1,094 ms
76,064 KB
testcase_32 AC 35 ms
53,460 KB
testcase_33 AC 594 ms
75,936 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
for j in range(n):
    a,b=map(int,input().split())
    co=0
    for i in reversed(range(35)):
        co+=2**i
        if co**2>4*a*b:
            co-=2**i
    cco=0
    for i in reversed(range(35)):
        cco+=2**i
        if cco**2>a+b+co:
            cco-=2**i
    print(cco+1)
0