結果
問題 |
No.1664 Unstable f(n)
|
ユーザー |
|
提出日時 | 2021-11-28 20:29:02 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 209 bytes |
コンパイル時間 | 113 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,496 KB |
最終ジャッジ日時 | 2024-07-01 15:27:28 |
合計ジャッジ時間 | 2,566 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 31 WA * 7 |
ソースコード
n = int(input()) ans = n pow_num = 2 while int(pow(n, 1 / pow_num)) > 1: f = int(pow(n, 1 / pow_num)) r = n - pow(f, pow_num) ans = min(ans, f + pow_num + r) pow_num += 1 print(ans)