Minimum of an Array
Given a list of integers, print the smallest one.
Input: the first line has an integer N; the second line has N integers separated by spaces.
Output: one integer — the minimum value.
Constraints:
- 1 ≤ N ≤ 2000
- −109 ≤ ai ≤ 109
Sample Tests
Input 1
5 4 2 9 2 8
Output 1
2
Input 2
3 -5 -2 -9
Output 2
-9
Discussion (opens after you solve — no spoilers before)
No comments yet.