Type: Default 1000ms 256MiB

数组2 查询

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

问题描述

读入 n 和x,

接下来读入n个整数。

问x是否在这n个数里出现。

是的话输出第一次出现的位置,

否的话或0。

样例输入1

6 1
3 1 4 1 5 9

样例输出1

2

样例输入2

6 8
3 1 4 1 5 9

样例输出2

0

初一年级数组3

Not Claimed
Status
Done
Problem
12
Open Since
2022-12-5 0:00
Deadline
2022-12-13 23:59
Extension
24 hour(s)