UVa 11384 - Help is needed for Dexter
传送门
UVa 11384 - Help is needed for Dexter
代码
#include <cstdio>
using namespace std;
int Fun(int n)
{
if (n == 1)
return 1;
return Fun(n / 2) + 1;
}
int main()
{
//freopen("input.txt", "r", stdin);
int n, i, j;
while (~scanf("%d", &n))
printf("%d\n", Fun(n));
return 0;
}
- 上一篇HDU 1166 - 敌兵布阵
- 下一篇关于折腾