Problem D: 【一维数组】数组元素的查找

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:171 Solved:109

Description

给你n个整数,查找其中有无值为x的数,有则输出该数第一次出现的位置,没有则输出-1。

Input

第一行一个整数n:数的个数 ( 0 <= n <= 100 )
  第二行n个整数(空格隔开)( 这些数在 0-999999范围内 )
  第三行为要查找的数x

Output

 x的位置或-1

Sample Input Copy

4
  5 7 6 6
  6

Sample Output Copy

3