#C5428. Find the Smallest Element
Find the Smallest Element
Find the Smallest Element
Given a list of n integers, you are required to find and output the smallest element in the list. Formally, if the list is represented as \(A = [a_1, a_2, \dots, a_n]\), compute \(\min_{1 \le i \le n} a_i\).
The problem is straightforward and tests your basic understanding of arrays and iteration.
inputFormat
The input is given via stdin and has the following format:
- The first line contains an integer \(n\) \( (1 \le n \le 10^5) \), the number of elements in the array.
- The second line contains \(n\) space-separated integers \(a_1, a_2, \dots, a_n\).
outputFormat
Output a single integer representing the smallest element in the array. The output should be written to stdout.
## sample6
3 1 4 1 5 9
1