結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー prog470
提出日時 2016-09-08 12:07:47
言語 C++11
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 379 bytes
コンパイル時間 558 ms
コンパイル使用メモリ 68,332 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-15 22:16:43
合計ジャッジ時間 1,335 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<stdio.h>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <string>

using namespace std;

int main() {

	long long cnt = 1, ans = 0, N;
	cin >> N;
	while (1) {
		if (cnt >= N) {
			break;
		}
		cnt *= 2;
		ans++;
	}

	cout << ans << endl;

	return 0;
}
0