标签:c++ iostream namespace 博客 数据

2 1 2 3 6
1 3
代码如下:
#include<iostream>
using namespace std;
int main()
{
long long f1,f2,temp;
int n,m,k;
cin>>n;
while(n--)
{
cin>>m>>k;
f1=1;f2=1;
for(int i=1;i<k-m;i++)
{
temp=f1+f2;
f1=f2;
f2=temp;
}
cout<<f2<<endl;
}
return 0;
}
标签:c++ iostream namespace 博客 数据
原文地址:http://blog.csdn.net/liuchang54/article/details/43201793