提交时间:2023-11-14 13:09:02
运行 ID: 110285
#include<bits/stdc++.h> using namespace std ; int n , a [10005] , m ; int main ( ) { cin >> n ; for ( int i = 1 ; i <= n ; i++ ) { cin >> a [i]; } cin >> m; for ( int i = 1 ; i <= n ; i++ ) { if( a [i] == m){ cout << i; return 0; } } cout << -1; return 0; }