Problem1154--【入门】数组元素的查找1154: 【入门】数组元素的查找
Time Limit: 1.000 Sec Memory Limit: 16 MB
Submit: 57 Solved: 29
[Submit] [Status] [Web Board] [Creator:][下载测试数据] Description
给你m个整数,查找其中有无值为n的数,有则输出该数第一次出现的位置,没有则输出-1。
Input
第一行一个整数m:数的个数 ( 0 <= m <= 100 ) 第二行m个整数(空格隔开)( 这些数在 0-1000000范围内 ) 第三行为要查找的数n;
Output
n的位置或-1
Sample Input
4
1 2 3 3
3
Sample Output
3
Source/Category
[Submit] [Status]