結果

問題 No.2420 Simple Problem
ユーザー hikikomorihikikomori
提出日時 2023-06-21 00:44:44
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 383 bytes
コンパイル時間 339 ms
コンパイル使用メモリ 10,680 KB
実行使用メモリ 9,444 KB
最終ジャッジ日時 2023-09-10 20:33:59
合計ジャッジ時間 70,087 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 23 ms
9,116 KB
testcase_01 AC 1,062 ms
9,224 KB
testcase_02 AC 32 ms
9,296 KB
testcase_03 AC 396 ms
9,376 KB
testcase_04 TLE -
testcase_05 AC 1,288 ms
9,276 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 22 ms
9,196 KB
testcase_27 TLE -
testcase_28 TLE -
testcase_29 TLE -
testcase_30 TLE -
testcase_31 TLE -
testcase_32 AC 20 ms
9,072 KB
testcase_33 AC 1,005 ms
9,336 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


def main():
    from math import floor
    from decimal import Decimal
    from sys import stdin
    from builtins import int, map
    readline = stdin.readline
    N = int(readline())
    for _ in range(N):
        a, b = map(int, readline().split())
        a = Decimal(a).sqrt()
        b = Decimal(b).sqrt()
        print(floor(a+b+1))


if __name__ == '__main__':
    main()

0