結果

問題 No.2420 Simple Problem
ユーザー hiryuNhiryuN
提出日時 2023-08-12 14:12:07
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 298 bytes
コンパイル時間 163 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 77,824 KB
最終ジャッジ日時 2024-04-30 05:21:53
合計ジャッジ時間 72,999 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
52,224 KB
testcase_01 AC 1,131 ms
76,656 KB
testcase_02 AC 98 ms
76,288 KB
testcase_03 AC 476 ms
76,800 KB
testcase_04 TLE -
testcase_05 AC 1,393 ms
76,792 KB
testcase_06 TLE -
testcase_07 TLE -
testcase_08 TLE -
testcase_09 TLE -
testcase_10 TLE -
testcase_11 TLE -
testcase_12 TLE -
testcase_13 TLE -
testcase_14 TLE -
testcase_15 TLE -
testcase_16 TLE -
testcase_17 TLE -
testcase_18 TLE -
testcase_19 TLE -
testcase_20 TLE -
testcase_21 TLE -
testcase_22 TLE -
testcase_23 TLE -
testcase_24 TLE -
testcase_25 TLE -
testcase_26 AC 67 ms
68,096 KB
testcase_27 TLE -
testcase_28 TLE -
testcase_29 TLE -
testcase_30 TLE -
testcase_31 TLE -
testcase_32 AC 38 ms
52,096 KB
testcase_33 AC 1,088 ms
76,760 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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