mirror of
https://github.com/m1ngsama/code4sk.git
synced 2025-12-25 02:56:17 +00:00
43 lines
633 B
C++
43 lines
633 B
C++
/*
|
|
7-8 ?????????????
|
|
?? 10
|
|
?? ??
|
|
?? ??????
|
|
????????,????n???????a?,?????a??????x?????a?????x????,????????????????(???0??);??????,??“Not Found”?
|
|
|
|
????:
|
|
????1?????????n(1=n=100)?????x,?2???n???,??????????????????????????
|
|
|
|
????:
|
|
????,???x??????????????;??????,??????“Not Found”?
|
|
|
|
????1:
|
|
5 9
|
|
2 9 8 1 9
|
|
????1:
|
|
4
|
|
????2:
|
|
10 101
|
|
2 8 10 1 9 8 -101 0 98762 1
|
|
????2:
|
|
Not Found
|
|
*/
|
|
|
|
#include<stdio.h>
|
|
int main(){
|
|
int n,x,i,cnt=0,max;
|
|
scanf("%d %d",&n,&x);
|
|
int a[n];
|
|
for(i=0;i<n;i++){
|
|
scanf("%d",&a[i]);
|
|
}
|
|
for(i=0;i<n;i++){
|
|
if(a[i]==x){
|
|
max=i;
|
|
cnt++;
|
|
}
|
|
}
|
|
if(cnt==0) printf("Not Found\n");
|
|
else printf("%d",max);
|
|
return 0;
|
|
}
|