結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー maguroguma
提出日時 2017-07-27 12:50:10
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 182 bytes
コンパイル時間 392 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-10-10 02:05:51
合計ジャッジ時間 1,789 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding: utf-8 -*-

N = int(input())
number = 0

i = 0
while 2**(i+1) < N:
    i += 1

if (N-2**i) == 1:
    i += 1
elif (N - 2**i)%2 == 1:
    i += 2
else:
    i += 1

print(i)
0