1244 请问一个整数能够整除几次2
#include<iostream>
using namespace std;
int main()
{
int n;
cin>>n;
int a = 0;
int b = 2;
while(a<=n)
{
a=a+1;
b=b+2;
}
cout<<a;
return 0;
}
1062 求落地次数
#include<iostream>
using namespace std;
int main()
{
int a = 100;
int b =0;
while(a>=0.5)
{
a=a/2;
b=b+1;
}
b=b+1;
cout<<b;
return 0;
}