結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー hisataka7hisataka7
提出日時 2020-10-08 16:03:50
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 1,019 bytes
コンパイル時間 1,327 ms
コンパイル使用メモリ 166,392 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-27 11:50:39
合計ジャッジ時間 3,270 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 1 ms
4,380 KB
testcase_11 AC 1 ms
4,376 KB
testcase_12 AC 1 ms
4,380 KB
testcase_13 AC 1 ms
4,376 KB
testcase_14 AC 1 ms
4,376 KB
testcase_15 AC 2 ms
4,376 KB
testcase_16 AC 1 ms
4,380 KB
testcase_17 AC 2 ms
4,376 KB
testcase_18 AC 1 ms
4,380 KB
testcase_19 AC 1 ms
4,380 KB
testcase_20 AC 1 ms
4,380 KB
testcase_21 AC 1 ms
4,376 KB
testcase_22 AC 2 ms
4,380 KB
testcase_23 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
#define rep(i,n) for(ll i=0;i<ll(n);i++)
#define reps(i,n) for(ll i=1;i<ll(n);i++)
#define rrep(i,n) for(ll i=ll(n);i>=0;i--)
#define len(x) x.length()//配列の長さ
#define NPOS string::npos//findで検索失敗した場合の戻り値
typedef long long ll;
using namespace std;
ll ans=0;
ll gcd(ll a, ll b) {if (b==0) return a;else return gcd(b, a%b);}//最大公約数
ll lcm(ll a, ll b) {return a * b / gcd(a, b);}//最小公倍数
ll digit_sum(ll a,ll b){ll ans=0;while(a>0){ans+=a%b;a/=b;}return ans;}//n進桁和
ll digit_num(ll a,ll b){ll ans=0;while(a>0){ans++;a/=b;}return ans;}//n進桁数
ll fact(ll n){if(n==1)return 1;else return n*fact(n-1);}//階乗
ll array_sum(ll *a,ll n){ll ans=0;rep(i,n){ans+=a[i];}return ans;}//配列総和
ll combi(ll n, ll k){if(n==k||k==0){return 1;}else{return combi(n-1,k-1)+combi(n-1,k);}}//nCkの組み合わせ


int main()
{
  ll n;
  cin>>n;
  ll ans=1;
  ll tmp=0;
  while(ans<n){
    ans*=2;
    tmp++;
  }
  cout<<tmp<<endl;
  return 0;
}
0