結果

問題 No.1176 少ない質問
ユーザー penguinmanpenguinman
提出日時 2020-11-01 01:16:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 208 ms / 1,000 ms
コード長 285 bytes
コンパイル時間 279 ms
コンパイル使用メモリ 87,268 KB
実行使用メモリ 77,152 KB
最終ジャッジ日時 2023-09-29 10:56:41
合計ジャッジ時間 5,769 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 205 ms
76,924 KB
testcase_01 AC 208 ms
77,072 KB
testcase_02 AC 208 ms
76,916 KB
testcase_03 AC 202 ms
77,124 KB
testcase_04 AC 204 ms
76,864 KB
testcase_05 AC 206 ms
76,916 KB
testcase_06 AC 206 ms
77,028 KB
testcase_07 AC 206 ms
76,940 KB
testcase_08 AC 205 ms
76,944 KB
testcase_09 AC 202 ms
76,860 KB
testcase_10 AC 206 ms
76,832 KB
testcase_11 AC 205 ms
77,092 KB
testcase_12 AC 205 ms
76,916 KB
testcase_13 AC 204 ms
76,832 KB
testcase_14 AC 205 ms
77,012 KB
testcase_15 AC 205 ms
77,028 KB
testcase_16 AC 206 ms
77,108 KB
testcase_17 AC 207 ms
77,012 KB
testcase_18 AC 205 ms
77,108 KB
testcase_19 AC 205 ms
77,076 KB
testcase_20 AC 203 ms
77,152 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
ans=N
for i in range(100):
    if i==0:
        continue
    x=pow(N,1/i)
    x=int(x)
    #print(x**i)
    if(x**i>N):
        ans=min(ans,x*i)
    for j in range(1000):
        x+=1
        if(x**i>N):
            ans=min(ans,x*i)
if N==int(1e18):
    x=1/0
print(ans)
0