結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー shioya
提出日時 2018-12-06 18:34:08
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 259 bytes
コンパイル時間 579 ms
コンパイル使用メモリ 68,868 KB
最終ジャッジ日時 2025-01-06 18:28:48
ジャッジサーバーID
(参考情報)
judge1 / judge6
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<string>
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int n,cnt,num;
	cin>>n;
	cnt = 0;
	num = 1;
	while(1)
	{
		num=num<<1;
		cnt++;
		if( n <= num){
			cout<<cnt<<endl;
			break;
		}
		//cout<<num<<endl;
	}
	return 0;
}
0