結果

問題 No.1176 少ない質問
ユーザー kozy
提出日時 2020-08-21 22:00:43
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 808 bytes
コンパイル時間 104 ms
コンパイル使用メモリ 13,056 KB
実行使用メモリ 17,700 KB
最終ジャッジ日時 2024-10-15 05:38:25
合計ジャッジ時間 2,743 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4 TLE * 1 -- * 16
権限があれば一括ダウンロードができます

ソースコード

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