import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int b[] = new int[n];
for (int i = 0; i < n; i++) {
b[i] = sc.nextInt();
}
int a = sc.nextInt();
for (int i = 0; i < n; i++) {
if (b[i] == a) {
System.out.println(i + 1);
return;
}
}
System.out.println(-1);
}
}
蓝桥杯 查找整数
最新推荐文章于 2022-11-25 20:43:40 发布