NOJ/98/main.c

15 lines
175 B
C
Raw Normal View History

2020-08-31 16:46:43 +00:00
#include <stdio.h>
long f(long n){
if(!n) return 0;
else return 1+f(n/2);
}
int main(void){
long n;
while(scanf("%ld",&n) && n){
printf("%ld\n",f(n));
}
return 0;
}