結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
11,008 KB
testcase_01 AC 343 ms
11,008 KB
testcase_02 AC 33 ms
10,752 KB
testcase_03 AC 146 ms
10,880 KB
testcase_04 AC 634 ms
10,880 KB
testcase_05 AC 403 ms
11,008 KB
testcase_06 AC 762 ms
11,008 KB
testcase_07 AC 767 ms
11,136 KB
testcase_08 AC 779 ms
10,880 KB
testcase_09 AC 774 ms
11,008 KB
testcase_10 AC 779 ms
11,136 KB
testcase_11 AC 776 ms
10,880 KB
testcase_12 AC 790 ms
11,136 KB
testcase_13 AC 787 ms
11,008 KB
testcase_14 AC 781 ms
11,008 KB
testcase_15 AC 778 ms
11,008 KB
testcase_16 AC 773 ms
11,008 KB
testcase_17 AC 774 ms
10,880 KB
testcase_18 AC 778 ms
11,008 KB
testcase_19 AC 767 ms
10,880 KB
testcase_20 AC 777 ms
11,008 KB
testcase_21 AC 786 ms
11,008 KB
testcase_22 AC 778 ms
11,008 KB
testcase_23 AC 775 ms
11,008 KB
testcase_24 AC 769 ms
11,008 KB
testcase_25 AC 770 ms
11,008 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 29 ms
10,880 KB
testcase_33 AC 331 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)
    if abs(tempAns-temp) < 10 ** -7:
        tempAns += 1
    print(tempAns)
0