Md. Arifur Rahman (Sazal)
ক্রমে ক্রমে হ্রাস পাচ্ছে বিবেক, ঘুমিয়ে পড়ছে মানবতা……
Pages
Home
ACM Algorithm
Math
E- Balagurusamy
Basic Program
Assembly Language
Gallery
My Portfolio
Thursday, 19 May 2011
uva 11636-Hellow World!
#include<stdio.h>
int main()
{
register int line,i,pest=0,cases=1;
//freopen("in.txt","r",stdin);
while((scanf("%d",&line)==1) && (line>0))
{
for(i=2;i<=line;i*=2,pest++);
if(line-i/2) pest++;
printf("Case %d: %d\n",cases++,pest);
pest=0;
}
return(0);
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment