竞赛
考级
#include<bits/stdc++.h> using namespace std; int n,a[100000]; int main(){ cin >> n; for(int i=1;i<=n;i++){ cin >> a[i]; } for(int i=a[1],j=1;j<=n;i++,j++){ if(a[j]!=i){ cout << i; return 0; } } cout<<"Sequence is consecutive"; }
吴卡 ━━╋══════➢