結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー Ilag
提出日時 2019-11-06 23:16:21
言語 C++11
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 311 bytes
コンパイル時間 1,395 ms
コンパイル使用メモリ 157,180 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-15 00:28:59
合計ジャッジ時間 2,541 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for (int i = 0; i < (n); i++)
typedef long long ll;
// Welcome to my source code!

int main() {
    int n;
    cin >> n;
    int cnt = 0;
    for (ll biscuit = 1; biscuit < n;) {
        biscuit *= 2;
        cnt++;
    }
    cout << cnt << endl;
}
0