結果

問題 No.1162 Many Quotients hard
ユーザー 👑 KazunKazun
提出日時 2021-03-04 04:55:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 39 ms / 2,000 ms
コード長 454 bytes
コンパイル時間 251 ms
コンパイル使用メモリ 82,492 KB
実行使用メモリ 54,448 KB
最終ジャッジ日時 2024-04-14 23:52:53
合計ジャッジ時間 3,141 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,940 KB
testcase_01 AC 36 ms
53,372 KB
testcase_02 AC 36 ms
52,840 KB
testcase_03 AC 37 ms
53,124 KB
testcase_04 AC 36 ms
52,876 KB
testcase_05 AC 35 ms
52,848 KB
testcase_06 AC 37 ms
54,148 KB
testcase_07 AC 35 ms
52,920 KB
testcase_08 AC 37 ms
53,032 KB
testcase_09 AC 36 ms
53,612 KB
testcase_10 AC 36 ms
52,552 KB
testcase_11 AC 35 ms
53,368 KB
testcase_12 AC 36 ms
52,320 KB
testcase_13 AC 37 ms
53,124 KB
testcase_14 AC 38 ms
52,716 KB
testcase_15 AC 35 ms
52,824 KB
testcase_16 AC 34 ms
53,248 KB
testcase_17 AC 34 ms
52,496 KB
testcase_18 AC 34 ms
53,580 KB
testcase_19 AC 37 ms
53,604 KB
testcase_20 AC 36 ms
52,708 KB
testcase_21 AC 35 ms
52,540 KB
testcase_22 AC 36 ms
52,596 KB
testcase_23 AC 36 ms
53,076 KB
testcase_24 AC 35 ms
53,672 KB
testcase_25 AC 35 ms
53,344 KB
testcase_26 AC 37 ms
52,812 KB
testcase_27 AC 39 ms
52,548 KB
testcase_28 AC 37 ms
52,256 KB
testcase_29 AC 36 ms
52,472 KB
testcase_30 AC 34 ms
52,732 KB
testcase_31 AC 34 ms
52,576 KB
testcase_32 AC 36 ms
53,220 KB
testcase_33 AC 35 ms
52,740 KB
testcase_34 AC 36 ms
53,240 KB
testcase_35 AC 38 ms
52,376 KB
testcase_36 AC 37 ms
52,500 KB
testcase_37 AC 37 ms
53,400 KB
testcase_38 AC 37 ms
52,388 KB
testcase_39 AC 38 ms
53,756 KB
testcase_40 AC 37 ms
53,084 KB
testcase_41 AC 35 ms
52,696 KB
testcase_42 AC 35 ms
52,564 KB
testcase_43 AC 35 ms
54,448 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def Ceil_Root(a,k):
    """ceil(a^(1/k)) を求める.

    a:非負整数
    k:正の整数
    """
    assert 0<=a and 0<k
    if a==0:
        return 0
    if k==1:
        return a

    #大体の値を求める.
    x=int(pow(a,1/k))+1

    #増やす
    while pow(x,k)<a:
        x+=1

    #減らす
    while a<=pow(x-1,k):
        x-=1
    return x
#================================================
N=int(input())
print(Ceil_Root(4*(N+1),2)-2)
0