結果

問題 No.2420 Simple Problem
ユーザー Kyoro IDKyoro ID
提出日時 2023-08-12 14:57:53
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 546 bytes
コンパイル時間 156 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 45,312 KB
最終ジャッジ日時 2024-04-30 07:38:04
合計ジャッジ時間 20,692 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
11,904 KB
testcase_01 AC 279 ms
25,600 KB
testcase_02 AC 47 ms
12,160 KB
testcase_03 AC 133 ms
16,896 KB
testcase_04 AC 498 ms
38,400 KB
testcase_05 AC 337 ms
28,928 KB
testcase_06 AC 613 ms
45,312 KB
testcase_07 AC 614 ms
45,312 KB
testcase_08 AC 615 ms
45,312 KB
testcase_09 AC 618 ms
45,312 KB
testcase_10 AC 610 ms
45,312 KB
testcase_11 AC 618 ms
45,312 KB
testcase_12 AC 615 ms
45,184 KB
testcase_13 AC 607 ms
45,312 KB
testcase_14 AC 607 ms
45,184 KB
testcase_15 AC 615 ms
45,184 KB
testcase_16 AC 623 ms
45,312 KB
testcase_17 AC 612 ms
45,312 KB
testcase_18 AC 608 ms
45,312 KB
testcase_19 AC 610 ms
45,312 KB
testcase_20 AC 616 ms
45,312 KB
testcase_21 AC 608 ms
45,184 KB
testcase_22 AC 610 ms
45,312 KB
testcase_23 AC 611 ms
45,312 KB
testcase_24 AC 622 ms
45,312 KB
testcase_25 AC 611 ms
45,312 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 44 ms
11,904 KB
testcase_33 AC 274 ms
25,344 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
import logging
import math
input = sys.stdin.readline
logger = logging.getLogger(__name__)


def read():
    N = int(input().strip())
    AB = []
    for i in range(N):
        a, b = map(int, input().strip().split())
        AB.append((a, b))
    return N, AB


def solve(N, AB):
    for a, b in AB:
        ab = math.sqrt(a) + math.sqrt(b)
        ans = math.floor(ab) + 1
        print(ans)


if __name__ == "__main__":
    inputs = read()
    outputs = solve(*inputs)
    if outputs is not None:
        print("%s" % str(outputs))
0