
ZOJ Problem Set  2087
Lazy Genius, a excellent archaeologist, has been depressed for several days. When Mr. Genius explored in a tomb, he found many lines of numbers on the wall. He got closed to the numbers in order to see more clearly. However, he is discouraged to found that the last several digits of each number unable to identify. From the first digits of each number, Mr.Genius guessed that all the numbers were the powers of 2. He wanted to recover all the numbers, but his mathematics is really poor. so he turns to you, a gifted programming student, hoping that you could help him. You task is to find the minimum power of 2 of which the first several digits are given.
Author: LIN, Zi Source: ZOJ Monthly, February 2004 