总时间限制:
1000ms
内存限制:
65536kB
描述
Given a sequence S of N numbers. Find the least index id so that S[id] equals to K.
输入
First line: two positive integers N (N <= 100) and K (K <= 100000).
Second line: N positive integers (<= 100000).
输出
One integer id.
样例输入
8 5 2 4 7 8 5 3 9 5
样例输出
5
#include
using namespace std;
int a[105],num,t=1;
int main()
{
int m;
scanf("%d%d",&num,&m);
for(int i=1;i<=num;i++)
scanf("%d",&a[i]);
for(int i=1;i<=num;i++)
{
if(a[i]==m)//比
{
cout< break;
}
}
return 0;
}



