import java.util.Scanner;
public class Main {
static long[] a=new long[82];
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
a[1]=1;
a[2]=1;
while(in.hasNext()){
int from=in.nextInt();
int to=in.nextInt();
System.out.println(get(from,to));
}
in.close();}
static long get(int n,int m){
long sum=0;
if(n == 1 && m == 1)
return 1;
else if(n == 1 && m == 2)
return 2;
else if(a[3]==0)
for(int i=3;i<82;i++)
a[i]=a[i-1]+a[i-2];
for(int i = n; i <=m; i++)
sum += a[i];
return sum;
}
}
1004客似云来
最新推荐文章于 2020-08-04 23:21:32 发布