Pro.ID10070 TitleHow many Fibs? Title链接http://10.20.2.8/oj/exercise/problem?problem_id=10070 AC24 Submit141 Ratio17.02% 时间&空间限制描述Recall the definition of the Fibonacci numbers:
Given two numbers a and b, calculate how many Fibonacci numbers are in the range [a, b]. 输入The input contains several test cases. Each test case consists of two non-negative integer numbers a and b. Input is terminated by a=b=0. Otherwise, a ≤ b ≤ 10100. The numbers a and b are given with no superfluous leading zeros. 输出Description Recall the definition of the Fibonacci numbers:
Given two numbers a and b, calculate how many Fibonacci numbers are in the range [a, b]. Input The input contains several test cases. Each test case consists of two non-negative integer numbers a and b. Input is terminated by a=b=0. Otherwise, a ≤ b ≤ 10100. The numbers a and b are given with no superfluous leading zeros. Output For each test case output on a single line the number of Fibonacci numbers f i with a ≤ f i ≤ b. Sample Input 10 100 Sample Output 5 Source 样例输入10 100 样例输出5 作者 |