[ZJd658[UVA11636] Hello World!
題目:
http://zerojudge.tw/ShowProblem?problemid=d658
---------------------------------------------------------------------------------------------------
#include<cstdio>
#include<cmath>
int main()
{
int n,T=1;
while(scanf("%d",&n) == 1 && n > 0)
printf("Case %d: %d\n",T++,(int)ceil(log2(n)));
return 0;
}
http://zerojudge.tw/ShowProblem?problemid=d658
---------------------------------------------------------------------------------------------------
#include<cstdio>
#include<cmath>
int main()
{
int n,T=1;
while(scanf("%d",&n) == 1 && n > 0)
printf("Case %d: %d\n",T++,(int)ceil(log2(n)));
return 0;
}
留言
張貼留言