提交时间:2023-11-08 13:34:45

运行 ID: 109344

#include<bits/stdc++.h> using namespace std; int main() { int q; cin>>q; int a[q],wei,qiu; bool yes=0; for (int t=0;t<q;t++) { cin>>a[t]; } cin>>qiu; for (int t=0;t<q;t++) { if (a[t]==qiu) { cout<<t+1; yes=1; } } if (yes==0) cout<<"-1"; return 0; }