The Coolest Temperature
Easy+10 XP · +5 Auraarraysloops
Anshul loves checking the weather. He has a list of daily temperatures for the last week. He wants to find the coolest (minimum) temperature recorded during that week. Can you help him find it?
Input
The first line contains an integer N, the number of days. The second line contains N integers, the temperatures recorded each day.
Output
Print a single integer, the minimum temperature recorded.
Constraints
1 <= N <= 1000 -100 <= temperature <= 100
Time limit 1 s (native code; slower languages get more)Memory 256 MB12 hidden tests
Example 1
Input
5 25 20 18 22 19
Output
18
The minimum temperature recorded is 18.
Example 2
Input
3 -5 -2 -8
Output
-8
The minimum temperature recorded is -8.
Hints
# Read the input from stdin and print the answer.
import sys
def main():
data = sys.stdin.read().split()
# your code here
main()
Example 1 input
5 25 20 18 22 19
Example 2 input
3 -5 -2 -8