結果

問題 No.1664 Unstable f(n)
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2021-09-03 21:39:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 46 ms / 2,000 ms
コード長 368 bytes
コンパイル時間 359 ms
コンパイル使用メモリ 82,256 KB
実行使用メモリ 67,044 KB
最終ジャッジ日時 2024-05-09 02:32:54
合計ジャッジ時間 3,271 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
65,292 KB
testcase_01 AC 43 ms
65,400 KB
testcase_02 AC 44 ms
65,908 KB
testcase_03 AC 45 ms
64,576 KB
testcase_04 AC 43 ms
64,072 KB
testcase_05 AC 43 ms
63,944 KB
testcase_06 AC 46 ms
64,576 KB
testcase_07 AC 43 ms
64,612 KB
testcase_08 AC 44 ms
65,196 KB
testcase_09 AC 43 ms
63,980 KB
testcase_10 AC 43 ms
65,588 KB
testcase_11 AC 44 ms
65,420 KB
testcase_12 AC 43 ms
64,876 KB
testcase_13 AC 44 ms
65,604 KB
testcase_14 AC 43 ms
65,072 KB
testcase_15 AC 44 ms
64,572 KB
testcase_16 AC 44 ms
65,092 KB
testcase_17 AC 44 ms
65,004 KB
testcase_18 AC 43 ms
64,396 KB
testcase_19 AC 46 ms
64,576 KB
testcase_20 AC 44 ms
65,332 KB
testcase_21 AC 43 ms
65,460 KB
testcase_22 AC 46 ms
66,584 KB
testcase_23 AC 43 ms
65,196 KB
testcase_24 AC 46 ms
67,044 KB
testcase_25 AC 43 ms
64,940 KB
testcase_26 AC 43 ms
64,268 KB
testcase_27 AC 43 ms
64,644 KB
testcase_28 AC 43 ms
64,180 KB
testcase_29 AC 44 ms
64,804 KB
testcase_30 AC 43 ms
64,248 KB
testcase_31 AC 43 ms
65,068 KB
testcase_32 AC 43 ms
64,376 KB
testcase_33 AC 45 ms
64,456 KB
testcase_34 AC 43 ms
64,540 KB
testcase_35 AC 43 ms
64,136 KB
testcase_36 AC 44 ms
64,304 KB
testcase_37 AC 44 ms
64,856 KB
testcase_38 AC 44 ms
66,220 KB
testcase_39 AC 45 ms
64,740 KB
testcase_40 AC 43 ms
64,976 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