#include "iostream"
using namespace std;
int main()
{
int num;
while (cin >> num && num)
{
int count = 0, temp = 0;
while (num != 1)
{
temp = num % 2;
num /= 2;
num += temp;
count++;
}
cout << count << endl;
}
}
zoj 2722 Head-to-Head Match
最新推荐文章于 2021-11-16 10:18:00 发布