提交时间:2023-11-11 09:41:38
运行 ID: 109702
#include<bits/stdc++.h> using namespace std; long long nums[10001]; int n; int main() { cin>>n; for(int i =1;i <= n;i++){ cin>>nums[i]; } int m; cin>>m; for(int i =1;i <= n;i++){ if(nums[i] == m){ cout<<i<<endl; exit(0); } } cout<<-1<<endl; return 0; }