|
||||||||||
Inverting CupsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65568/32768 K (Java/Others)Total Submission(s): 1168 Accepted Submission(s): 332 Problem Description When people drink some tea in the teahouse, they also play some casual games. Now, inverting cups is a popular game. The meaning of the question is, now there are some cups which are upturned, we can regard the total number of the cups as a positive integer number A , and we can invert some cups, the number is B and B is also a positive integer number. We define one retroflexion that if the original cup is upturned, one retroflexion makes it downward, and if the original cup is downward, one retroflexion makes it upturned. So the question is if the whole original cups are upturned , can we invert these cups to make all the cups downward? And if it is possible, how many is the least of times? Input The input contains multiple test cases(cases<=100000). Each case one line given two numbers , the first integer A (1<=A<=2^63) and the second integer B (1<=B<=A). The input is terminated by the end of file. Output For each test case, you should output how many the least of times if it is possible for us to invert all the cups, and if it is impossible please output ¡°No Solution!¡± Sample Input
Sample Output
Source | ||||||||||
|