Python 语言程序设计(2017 年秋)

1053. Binary search

单点时限: 1.0 sec

内存限制: 256 MB

Input an integer $n$ ($1 \le n \le 1000$) in first line,$n$ integers with one blank separated into an array in second line, and an integer $m$ in third line.

Use binary search algorithm to find and output the position of $m$ in the array (position starts with $1$).

Output not found if $m$ is not in the array.

Assume all integers inputted in the array have different values, and in ascending order.

All integers have absolute values less than $2^{31}$.

样例

Input
7
1 3 5 7 53 355 3432
3
Output
2
不限期开放

题目列表