結果

問題 No.1664 Unstable f(n)
ユーザー lloyz
提出日時 2021-11-28 20:25:53
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 189 bytes
コンパイル時間 198 ms
コンパイル使用メモリ 82,392 KB
実行使用メモリ 54,144 KB
最終ジャッジ日時 2024-07-01 15:24:46
合計ジャッジ時間 3,245 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 31 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

ans = n
pow_num = 2
while int(n**(1/pow_num)) > 1:
    f = int(n**(1/pow_num))
    r = n - pow(f, pow_num)
    ans = min(ans, f + pow_num + r)
    pow_num += 1
print(ans)
0