結果

問題 No.1664 Unstable f(n)
ユーザー taiga0629kyoprotaiga0629kyopro
提出日時 2021-09-03 21:31:49
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 218 bytes
コンパイル時間 413 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 71,040 KB
最終ジャッジ日時 2024-05-09 02:00:21
合計ジャッジ時間 4,114 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
71,040 KB
testcase_01 AC 49 ms
70,784 KB
testcase_02 AC 51 ms
70,784 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 50 ms
70,528 KB
testcase_07 AC 52 ms
70,784 KB
testcase_08 AC 50 ms
70,784 KB
testcase_09 AC 50 ms
70,784 KB
testcase_10 AC 51 ms
70,528 KB
testcase_11 AC 50 ms
70,748 KB
testcase_12 AC 51 ms
70,400 KB
testcase_13 AC 50 ms
70,444 KB
testcase_14 AC 50 ms
71,040 KB
testcase_15 AC 52 ms
70,784 KB
testcase_16 AC 51 ms
70,400 KB
testcase_17 AC 50 ms
71,040 KB
testcase_18 AC 49 ms
70,400 KB
testcase_19 AC 50 ms
70,656 KB
testcase_20 AC 52 ms
70,912 KB
testcase_21 AC 50 ms
70,400 KB
testcase_22 AC 51 ms
70,400 KB
testcase_23 AC 50 ms
70,784 KB
testcase_24 AC 62 ms
70,528 KB
testcase_25 AC 49 ms
70,656 KB
testcase_26 AC 51 ms
70,528 KB
testcase_27 AC 50 ms
71,040 KB
testcase_28 AC 50 ms
70,528 KB
testcase_29 AC 51 ms
70,784 KB
testcase_30 AC 62 ms
70,784 KB
testcase_31 AC 54 ms
70,784 KB
testcase_32 AC 50 ms
71,040 KB
testcase_33 AC 49 ms
70,784 KB
testcase_34 AC 51 ms
70,656 KB
testcase_35 AC 51 ms
70,784 KB
testcase_36 AC 53 ms
70,400 KB
testcase_37 AC 51 ms
70,528 KB
testcase_38 AC 50 ms
70,912 KB
testcase_39 AC 51 ms
70,496 KB
testcase_40 AC 52 ms
70,912 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
ans=10**19
for j in range(65):
    ok=0
    ng=10**18
    while ng-ok>1:
        mid=(ok+ng)//2
        if mid**j<=n:ok=mid
        else:ng=mid

    i=ok

    k=n-i**j
    ans=min(ans,i+j+k)

print(ans)
0