結果

問題 No.2420 Simple Problem
ユーザー SuzuxSuzux
提出日時 2023-08-12 15:09:33
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 306 bytes
コンパイル時間 311 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,136 KB
最終ジャッジ日時 2024-04-30 08:13:43
合計ジャッジ時間 28,341 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,752 KB
testcase_01 AC 398 ms
10,880 KB
testcase_02 AC 33 ms
10,752 KB
testcase_03 AC 165 ms
10,880 KB
testcase_04 AC 732 ms
10,880 KB
testcase_05 AC 473 ms
10,880 KB
testcase_06 AC 928 ms
10,880 KB
testcase_07 AC 927 ms
10,880 KB
testcase_08 AC 933 ms
10,880 KB
testcase_09 AC 918 ms
10,880 KB
testcase_10 AC 915 ms
10,880 KB
testcase_11 AC 920 ms
10,880 KB
testcase_12 AC 910 ms
10,880 KB
testcase_13 AC 926 ms
11,008 KB
testcase_14 AC 926 ms
10,880 KB
testcase_15 AC 922 ms
10,880 KB
testcase_16 AC 912 ms
10,880 KB
testcase_17 AC 918 ms
10,880 KB
testcase_18 AC 921 ms
10,880 KB
testcase_19 AC 922 ms
10,880 KB
testcase_20 AC 921 ms
11,008 KB
testcase_21 AC 910 ms
10,880 KB
testcase_22 AC 916 ms
10,880 KB
testcase_23 AC 914 ms
11,008 KB
testcase_24 AC 908 ms
10,880 KB
testcase_25 AC 918 ms
10,880 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 30 ms
10,752 KB
testcase_33 AC 389 ms
10,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
from sys import stdin

n = int(input())

for _ in range(n):
    a, b = list(map(int, stdin.readline().split()))
    temp = a**0.5 + b**0.5
    tempAns = math.ceil(temp)
    for i in range(-1, 2):
        if tempAns+i > temp:
            tempAns = tempAns+i
            break
    print(tempAns)
0