UVa 11636 Hello World!
生活随笔
收集整理的這篇文章主要介紹了
UVa 11636 Hello World!
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
#include<cstdio>
#include<cmath>
using namespace std;
int main()
{
??? int n,T=1;
??? while(scanf("%d",&n),n>0)
??? {
??????? printf("Case %d: %d\n",T++,(int)ceil(log10(n)/log10(2)));? //換底公式
??? }
??? return 0;
}
#include<cmath>
using namespace std;
int main()
{
??? int n,T=1;
??? while(scanf("%d",&n),n>0)
??? {
??????? printf("Case %d: %d\n",T++,(int)ceil(log10(n)/log10(2)));? //換底公式
??? }
??? return 0;
}
轉載于:https://www.cnblogs.com/LtRoycePhantom/archive/2013/03/20/2971304.html
總結
以上是生活随笔為你收集整理的UVa 11636 Hello World!的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 《商务与经济统计》(三)
- 下一篇: 使用Go实现Socket服务端和客户端通