結果

問題 No.1664 Unstable f(n)
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2021-09-03 21:39:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 83 ms / 2,000 ms
コード長 368 bytes
コンパイル時間 352 ms
コンパイル使用メモリ 86,848 KB
実行使用メモリ 75,908 KB
最終ジャッジ日時 2023-08-21 20:30:57
合計ジャッジ時間 5,053 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
75,608 KB
testcase_01 AC 77 ms
75,696 KB
testcase_02 AC 78 ms
75,736 KB
testcase_03 AC 79 ms
75,560 KB
testcase_04 AC 77 ms
75,652 KB
testcase_05 AC 78 ms
75,636 KB
testcase_06 AC 78 ms
75,436 KB
testcase_07 AC 79 ms
75,540 KB
testcase_08 AC 78 ms
75,600 KB
testcase_09 AC 79 ms
75,528 KB
testcase_10 AC 79 ms
75,644 KB
testcase_11 AC 79 ms
75,344 KB
testcase_12 AC 78 ms
75,588 KB
testcase_13 AC 78 ms
75,756 KB
testcase_14 AC 79 ms
75,564 KB
testcase_15 AC 79 ms
75,384 KB
testcase_16 AC 78 ms
75,372 KB
testcase_17 AC 79 ms
75,588 KB
testcase_18 AC 79 ms
75,744 KB
testcase_19 AC 79 ms
75,700 KB
testcase_20 AC 77 ms
75,524 KB
testcase_21 AC 76 ms
75,612 KB
testcase_22 AC 82 ms
75,904 KB
testcase_23 AC 80 ms
75,764 KB
testcase_24 AC 83 ms
75,908 KB
testcase_25 AC 80 ms
75,660 KB
testcase_26 AC 79 ms
75,368 KB
testcase_27 AC 79 ms
75,640 KB
testcase_28 AC 79 ms
75,632 KB
testcase_29 AC 79 ms
75,672 KB
testcase_30 AC 78 ms
75,660 KB
testcase_31 AC 78 ms
75,436 KB
testcase_32 AC 77 ms
75,640 KB
testcase_33 AC 77 ms
75,660 KB
testcase_34 AC 78 ms
75,604 KB
testcase_35 AC 79 ms
75,660 KB
testcase_36 AC 77 ms
75,588 KB
testcase_37 AC 77 ms
75,740 KB
testcase_38 AC 78 ms
75,676 KB
testcase_39 AC 76 ms
75,660 KB
testcase_40 AC 78 ms
75,692 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

"""

r ** j = n

"""

import math
import sys
from sys import stdin

n = int(stdin.readline())

ans = n
for j in range(2,70):

    l = 1
    r = max( l+10 , 10**9 )

    while r-l != 1:

        i = (l+r)//2
        if i**j > n:
            r = i
        else:
            l = i

    i = l
    k = n - i**j

    #print (i,j,k)

    ans = min(ans , i+j+k)

print (ans)
0