Find the Smallest Element
Easyjavapythonccppjavascript
Given an array of N integers, find the smallest element in the array.
Input Format
The first line contains an integer N. The second line contains N space-separated integers.
Output Format
Print a single integer — the smallest element of the array.
Example 1
Input
5 8 3 6 1 5
Output
1
Explanation: 1 is smaller than every other element.
- 1 <= N <= 100000
- -1000000000 <= A[i] <= 1000000000