結果

問題 No.1255 ハイレーツ・オブ・ボリビアン
ユーザー shotoyooshotoyoo
提出日時 2020-10-09 22:50:36
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 382 bytes
コンパイル時間 175 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 64,768 KB
最終ジャッジ日時 2024-07-20 13:18:12
合計ジャッジ時間 4,172 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 7 TLE * 1 -- * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


t = int(input())
for _ in range(t):
    n = int(input())
    ans = 0
    v = 2
    done = False
    while not done:
        v = (n + v//2) if v%2==0 else (v//2 + 1)
        ans += 1
        if v==2:
            done = True
    print(ans)

0