Submission #19553026


Source Code Expand

Copy
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <sstream>
#include <cstring>
#include <string>
#include <queue>
#include <cstdio>
#include <stack>
#include <set>
#include <map>
#include <list>
#include <iomanip>
#include <utility>
#include <tuple>
#include <functional>
#include <bitset>
#include <cassert>
#include <complex>
#include <stdio.h>
#include <time.h>
#include <numeric>
#include <unordered_map>
#include <unordered_set>
# define ll int64_t
# define rep(i,n) for(ll i=0;i<n;i++)
# define rrep(i,n) for(ll i=1;i<=n;i++)
# define ALL(x) (x).begin(), (x).end()
# define SZ(x) ((int)(x).size())
# define pb push_back
# define mod 1000000007
# define PI 3.141592653589793
# define vec vector
#define dump(x) cerr<<#x<<"="<<x<<endl
using namespace std;

const ll MAX = 510000;
const ll MOD = 1000000007;
 
ll fac[MAX], finv[MAX], inv[MAX];
 
// テーブルを作る前処理
void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (ll i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}
 
// 二項係数計算
ll COM(ll n, ll k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

ll modpow(ll a,ll n,ll modl) {
    ll res=1;
    while(n>0){
        if(n&1) res=res*a%modl;
        a = a*a%modl;
        n >>= 1;
    }
    return res;
}

ll modinv(ll a, ll modl) {
    return modpow(a, modl - 2, modl);
}

ll factorial(ll n){
    ll x=1;
    rrep(i,n) x*=i;
    return x;
}

ll gcd(ll m,ll n){
    if(n==0) return m;
    return gcd(n,m%n);
}

const long long INF = 1LL << 60;

template<class T> void chmax(T& a,T b){
    if(a<b){
        a=b;
    }
}
template<class T> void chmin(T& a,T b){
    if(a>b){
        a=b;
    }
}

using Interval = pair<double,double>;

bool cmp(const Interval &a,const Interval &b){
    return a.second<b.second;
}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
     
    ll x,y,sum=0;
    cin>>x>>y;
    
    while(x<=y){
        x*=2;
        sum++;
    }
    cout<<sum<<endl;
    return 0;
}

Submission Info

Submission Time
Task C - Multiple Gift
User fidia
Language C++ (GCC 9.2.1)
Score 300
Code Size 2323 Byte
Status AC
Exec Time 6 ms
Memory 3508 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 15
Set Name Test Cases
Sample s1.txt, s2.txt, s3.txt
All 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, s1.txt, s2.txt, s3.txt
Case Name Status Exec Time Memory
01.txt AC 6 ms 3440 KB
02.txt AC 2 ms 3488 KB
03.txt AC 2 ms 3444 KB
04.txt AC 2 ms 3420 KB
05.txt AC 2 ms 3388 KB
06.txt AC 3 ms 3468 KB
07.txt AC 4 ms 3396 KB
08.txt AC 3 ms 3472 KB
09.txt AC 2 ms 3384 KB
10.txt AC 2 ms 3448 KB
11.txt AC 2 ms 3472 KB
12.txt AC 2 ms 3508 KB
s1.txt AC 2 ms 3332 KB
s2.txt AC 2 ms 3508 KB
s3.txt AC 3 ms 3460 KB