Welcome   HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online
 Home FAQs Pro Problem Set Practices Online Contests Major Exercises OI Special Judgement Submit Online Status User Ranklist Users Register new Login Web Links Hunan Normal University College of Information Science and Engineering
 How many Fibs? Time Limit: 1000ms, Special Time Limit:2500ms, Memory Limit:65536KB Total submit users: 22, Accepted users: 21 Problem 10529 : No special judgement Problem description Recall the definition of the Fibonacci numbers: f1 := 1 f2 := 2 fn := fn-1 + fn-2     (n>=3) 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 fi with a<=fi<=b. Sample Input 10 100 1234567890 9876543210 0 0 Sample Output 5 4 Problem Source jiyanmoyu Submit   Discuss   Judge Status  Problems  Ranklist

HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online, Version 2010.5.5.final.
Web visits:2349 today,16259076 total, since 2010-05-07