#7076. 数组元素的查找
数组元素的查找
Description
给你m个整数,查找其中有无值为n的数,有则输出该数第一次出现的位置,没有则输出-1。
Input Format
第一行一个整数m:数的个数 ( 0 <= m <= 100 ) 第二行m个整数(空格隔开)( 这些数在 0-1000000范围内 ) 第三行为要查找的数n;
Output Format
n的位置或-1
4
1 2 3 3
3
3
Source
数组问题
给你m个整数,查找其中有无值为n的数,有则输出该数第一次出现的位置,没有则输出-1。
第一行一个整数m:数的个数 ( 0 <= m <= 100 ) 第二行m个整数(空格隔开)( 这些数在 0-1000000范围内 ) 第三行为要查找的数n;
n的位置或-1
4
1 2 3 3
3
3
数组问题
By signing up a 津桥OJ universal account, you can submit code and join discussions in all online judging services provided by us.