1730: 【数组基础】数组元素的查找(输出该数第一次出现的位置)

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:93 Solved:78

Description

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

Input

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

Output

n的位置或-1

Sample Input Copy

4
1 2  3  3
3

Sample Output Copy

3

Source/Category