結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー toshi_allneko
提出日時 2020-04-05 16:52:52
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 253 bytes
コンパイル時間 84 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-07-03 08:14:36
合計ジャッジ時間 1,475 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding: utf-8 -*-
import sys
n = int(input())
last = 1
count = 0
while(True):
    if last*2 < n:
        last *= 2
        count += 1
    elif n - last == 1:
        count += 1
        break
    else:
        count += 1
        break

print(count)
0