結果

問題 No.1176 少ない質問
ユーザー uni_pythonuni_python
提出日時 2020-08-21 21:29:34
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 547 bytes
コンパイル時間 225 ms
コンパイル使用メモリ 81,996 KB
実行使用メモリ 53,972 KB
最終ジャッジ日時 2024-04-23 05:28:42
合計ジャッジ時間 1,736 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
52,340 KB
testcase_01 AC 41 ms
53,292 KB
testcase_02 AC 37 ms
53,340 KB
testcase_03 AC 38 ms
52,352 KB
testcase_04 AC 37 ms
52,504 KB
testcase_05 AC 38 ms
53,004 KB
testcase_06 AC 37 ms
53,228 KB
testcase_07 AC 37 ms
53,388 KB
testcase_08 AC 37 ms
53,760 KB
testcase_09 AC 38 ms
53,732 KB
testcase_10 AC 39 ms
52,828 KB
testcase_11 AC 38 ms
53,136 KB
testcase_12 AC 39 ms
53,020 KB
testcase_13 AC 38 ms
53,208 KB
testcase_14 AC 38 ms
52,728 KB
testcase_15 AC 38 ms
52,936 KB
testcase_16 AC 37 ms
52,400 KB
testcase_17 AC 37 ms
52,540 KB
testcase_18 AC 37 ms
53,972 KB
testcase_19 AC 37 ms
52,752 KB
testcase_20 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    A=I()
    p=1
    cnt=0
    while True:
        if p>=A:
            break
        else:
            p*=2
            cnt+=1
        
    ans=2*cnt
    
    p3=1
    cnt3=0
    while True:
        if p3>=A:
            break
        else:
            p3*=3
            cnt3+=1
            
    ans3=3*cnt3

    print(min(ans,ans3))            
    


main()
0