結果

問題 No.1664 Unstable f(n)
ユーザー lloyzlloyz
提出日時 2021-11-28 20:25:53
言語 PyPy3
(7.3.13)
結果
WA  
実行時間 -
コード長 189 bytes
コンパイル時間 375 ms
コンパイル使用メモリ 86,972 KB
実行使用メモリ 72,048 KB
最終ジャッジ日時 2023-09-14 07:58:44
合計ジャッジ時間 5,428 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,676 KB
testcase_01 AC 69 ms
71,680 KB
testcase_02 AC 70 ms
71,812 KB
testcase_03 AC 70 ms
71,512 KB
testcase_04 AC 69 ms
71,680 KB
testcase_05 AC 67 ms
71,400 KB
testcase_06 AC 68 ms
71,500 KB
testcase_07 AC 69 ms
71,688 KB
testcase_08 AC 68 ms
71,656 KB
testcase_09 AC 74 ms
71,672 KB
testcase_10 AC 69 ms
71,784 KB
testcase_11 AC 70 ms
71,676 KB
testcase_12 AC 69 ms
71,532 KB
testcase_13 AC 69 ms
71,272 KB
testcase_14 AC 69 ms
71,412 KB
testcase_15 AC 70 ms
71,696 KB
testcase_16 AC 69 ms
71,544 KB
testcase_17 AC 68 ms
71,576 KB
testcase_18 AC 69 ms
71,692 KB
testcase_19 AC 68 ms
71,692 KB
testcase_20 AC 71 ms
71,808 KB
testcase_21 AC 68 ms
71,740 KB
testcase_22 AC 70 ms
71,736 KB
testcase_23 AC 70 ms
71,556 KB
testcase_24 AC 69 ms
71,632 KB
testcase_25 AC 69 ms
71,808 KB
testcase_26 AC 69 ms
71,648 KB
testcase_27 AC 70 ms
71,692 KB
testcase_28 AC 69 ms
71,496 KB
testcase_29 AC 73 ms
71,692 KB
testcase_30 AC 69 ms
71,688 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 AC 70 ms
71,464 KB
testcase_38 WA -
testcase_39 AC 69 ms
71,680 KB
testcase_40 AC 68 ms
71,316 KB
権限があれば一括ダウンロードができます

ソースコード

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