标签:blog amp int code else scan stdio.h log scanf
1 #include<stdio.h> 2 int cus(int x,long long y) 3 { 4 long long temp = (long long)1<<(x-1); 5 if(y == temp) 6 return x; 7 else if(y > temp) 8 y-=temp; 9 cus(x-1,y); 10 } 11 int main() 12 { 13 int a; 14 long long b; 15 while(~scanf("%d%lld",&a,&b) && a+b) 16 printf("%d\n",cus(a,b)); 17 }
标签:blog amp int code else scan stdio.h log scanf
原文地址:http://www.cnblogs.com/qq188380780/p/6387982.html