結果

問題 No.1700 floor X
ユーザー moharan627moharan627
提出日時 2021-10-08 22:15:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 114 ms / 2,000 ms
コード長 692 bytes
コンパイル時間 662 ms
コンパイル使用メモリ 86,856 KB
実行使用メモリ 78,168 KB
最終ジャッジ日時 2023-09-16 09:12:26
合計ジャッジ時間 7,390 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
71,620 KB
testcase_01 AC 106 ms
77,896 KB
testcase_02 AC 110 ms
78,000 KB
testcase_03 AC 107 ms
78,016 KB
testcase_04 AC 106 ms
77,976 KB
testcase_05 AC 106 ms
78,124 KB
testcase_06 AC 108 ms
78,008 KB
testcase_07 AC 105 ms
77,944 KB
testcase_08 AC 104 ms
77,740 KB
testcase_09 AC 109 ms
78,168 KB
testcase_10 AC 108 ms
78,068 KB
testcase_11 AC 109 ms
77,916 KB
testcase_12 AC 109 ms
78,016 KB
testcase_13 AC 109 ms
77,960 KB
testcase_14 AC 106 ms
78,112 KB
testcase_15 AC 108 ms
77,736 KB
testcase_16 AC 106 ms
77,812 KB
testcase_17 AC 108 ms
77,740 KB
testcase_18 AC 109 ms
77,964 KB
testcase_19 AC 106 ms
77,708 KB
testcase_20 AC 106 ms
77,772 KB
testcase_21 AC 108 ms
77,816 KB
testcase_22 AC 108 ms
77,812 KB
testcase_23 AC 110 ms
78,120 KB
testcase_24 AC 111 ms
78,008 KB
testcase_25 AC 111 ms
77,772 KB
testcase_26 AC 112 ms
78,036 KB
testcase_27 AC 111 ms
77,960 KB
testcase_28 AC 109 ms
78,016 KB
testcase_29 AC 109 ms
78,048 KB
testcase_30 AC 109 ms
77,832 KB
testcase_31 AC 110 ms
77,712 KB
testcase_32 AC 109 ms
78,116 KB
testcase_33 AC 111 ms
78,000 KB
testcase_34 AC 112 ms
77,900 KB
testcase_35 AC 111 ms
77,748 KB
testcase_36 AC 114 ms
77,996 KB
testcase_37 AC 110 ms
78,008 KB
testcase_38 AC 108 ms
77,708 KB
testcase_39 AC 108 ms
78,072 KB
testcase_40 AC 111 ms
78,128 KB
testcase_41 AC 111 ms
78,028 KB
testcase_42 AC 97 ms
71,640 KB
testcase_43 AC 110 ms
78,088 KB
testcase_44 AC 107 ms
77,808 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
#sys.setrecursionlimit(10 ** 6)
INF = float('inf')
#10**20,2**63に変えるのもあり
MOD = 10**9 + 7
MOD2 = 998244353
from collections import defaultdict
def solve():
    def II(): return int(sys.stdin.readline())
    def LI(): return list(map(int, sys.stdin.readline().split()))
    def LC(): return list(input())
    def IC(): return [int(c) for c in input()]
    def MI(): return map(int, sys.stdin.readline().split())
    T = II()
    from math import ceil,floor,sqrt
    for _ in range(T):
        N = II()
        Ans = floor(sqrt(N))
        for a in range(max(Ans-5,0),Ans+5,1):
            if N<a**2:
                print(a-1)
                break
    return
solve()
0