結果

問題 No.1700 floor X
ユーザー GrayCoder
提出日時 2021-10-08 22:34:09
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 50 ms / 2,000 ms
コード長 330 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-07-03 10:32:17
合計ジャッジ時間 3,667 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 44
権限があれば一括ダウンロードができます

ソースコード

diff #

from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    T = int(input())
    for _ in [0] * T:
        N = int(input())
        n = int(N ** 0.5) + 1
        if n * n <= N:
            print(n)
        elif (n - 1) * (n - 1) <= N:
            print(n - 1)
        else:
            print(n - 2)


main()
0