it is showing error while submition.
but it is running perfectly fine on all compilers
even on ideone and codechef ide.
my code is:
#include
using namespace std;
int main()
{
int t,i;
cin>>t;
for(i=1;i<=t;i++)
{
int j,ft=0,st=0,temp,arr[10000],m,n,sum=0;
cin>>n>>m;
for(j=0;j<10000;j++)
{
temp=ft+st;
ft=st;
st=temp;
arr[j]=temp;
if(temp==0)
ft++;
// cout<<arr[j]<<" ";
}
for(j=n;j<=m;j++)
{
sum+=arr[j];
}
cout<<sum<<endl;
sum=0;
}
return 0;
}
if there is any problem in my soution so please tell me
link to the problem is
:https://www.spoj.com/problems/FIBOSUM/