結果

問題 No.1176 少ない質問
コンテスト
ユーザー cologne
提出日時 2025-12-18 16:01:54
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 702 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 314 ms
コンパイル使用メモリ 82,232 KB
実行使用メモリ 69,632 KB
最終ジャッジ日時 2025-12-18 16:01:57
合計ジャッジ時間 3,018 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import string
import sys
from itertools import count
from typing import Generator, List, Tuple


def input(): return sys.stdin.readline().rstrip('\n')


def main():
    a = int(input())
    ans = float('inf')
    for i in count(1):
        if a <= 3 ** i:
            ans = min(ans, 3 * i)
        if a <= 2 ** i:
            ans = min(ans, 2 * i)
            break
    return ans


if __name__ == '__main__':
    ret = main()


    def out(x):
        if isinstance(x, List) or isinstance(x, Tuple):
            print(*x)
        else:
            print(x)


    if ret is None:
        pass
    elif isinstance(ret, Generator):
        for val in ret:
            out(val)
    else:
        out(ret)
0