两个错误
#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
ull n,cnt,ppre,pre,fbnq,flag=false;
int main(){
ios::sync_with_stdio(0);cin.tie();cout.tie();
cin>>n;
for(int i=0;i<n;i++){
if(flag){cnt++;continue;}
ull x;cin>>x;
if(!i) ppre=pre=fbnq=x;
if(i>1){
ppre=pre;
pre=fbnq;
fbnq+=ppre;
}
if(x!=fbnq) cnt++;
if(fbnq>1000000) flag=true;
}
cout<<cnt;
return 0;
}