提交时间:2023-11-08 13:15:37
运行 ID: 109265
#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; }