找不到錯在哪 輸出都是not
#include<iostream>
#include<math.h>
using namespace std;
int main()
{
int n,number[3000],a,b;
while(cin>>n)
{
for(int i=0;i<n;i++)
{
cin>>number[i];
a=abs(number[i]-number[i-1]);
b=abs(number[i-2]-number[i-3]);
}
if(a-b==1)
{
cout<<"Jolly";
}
else
{
cout<<"Not jolly";
}
}
return 0;
}