1465 斐波数


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 32M

Problem types
Allowed languages
C, C++, Java, Python

Description

温习一下斐波那契数列

f1 := 1

f2 := 2

fn := fn-1 + fn-2     (n>=3)

给定两个数a和b,计算在区间[a,b]内有多少个斐波那契数。

Input

输入包含多组数据。每组数据包含两个非负整数a和b。

输入以a=b=0时终止,否则aOutput

对每组数据输出一行有多少斐波那契数fi满足a<=fi<=b。

Sample

Input

10 100
1234567890 9876543210
0 0

Output

5
4

Source: Boski.Jr


Comments

There are no comments at the moment.