2013年11月12日 星期二

[UVA] 11384 - Problem H Help is needed for Dexter


#include<stdio.h>
int main(){
    int n,add;
    while(scanf("%d",&n)!=EOF){
        add=0;
        while(n) add++,n/=2;
        printf("%d\n",add);
    }
}

沒有留言:

張貼留言