hiho week 77 register

Ended

Participants:382

Verdict:Accepted
Score:100 / 100
Submitted:2015-12-19 22:41:53

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,i,T;
    cin>>T;
    while(T--)
    {
        cin>>i>>n;
        while(i%4!=2&&i%4!=3&&n)
        {
            --n;
            i=ceil(i/4.0);
        }
        cout<<n<<endl;
    }
    return 0;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX