hdu 2044

#include<iostream>
#include<cstdio>
using namespace std;
long long  dp[51];
int main()
{
   int cas,s,e;
   cin>>cas;
   while(cas--)
   {
      cin>>s>>e;
      dp[s]=1;dp[s+1]=1;
      for(int t=s+2;t<=e;t++)
         dp[t]=dp[t-1]+dp[t-2];
      cout<<dp[e]<<endl;
   }
   return 0;

}

/*****递推的dp数组才50的大小竟然要用Long  long 才可以过,,,得重新认识递推了

posted @ 2015-11-06 16:56  快点说我帅  阅读(109)  评论(0编辑  收藏  举报