結果

問題 No.1176 少ない質問
ユーザー kozykozy
提出日時 2020-08-21 22:00:43
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 808 bytes
コンパイル時間 81 ms
コンパイル使用メモリ 12,928 KB
実行使用メモリ 16,384 KB
最終ジャッジ日時 2024-04-23 05:52:27
合計ジャッジ時間 2,699 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
16,384 KB
testcase_01 AC 32 ms
11,136 KB
testcase_02 AC 31 ms
11,008 KB
testcase_03 AC 31 ms
11,008 KB
testcase_04 TLE -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
import math
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())
def NIJIGEN(H): return [list(input()) for i in range(H)]
import sys
import math
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())
def NIJIGEN(H): return [list(input()) for i in range(H)]
ans=0
N=int(input())
s=N
while True:
    ans+=1
    N=N//3
    if N==1:
        break
if 3**ans<s:
    n=3*(ans+1)
else:
    n=3*ans
N=s
while True:
    ans+=1
    N=N//2
    if N==1:
        break
if 2**ans<s:
    m=2*(ans+1)
else:
    m=2*ans
print(min(n,m))
0