← Problem book: Python
Lesson 57 of 96 · 10 XP
Minimum and maximum
Theory and problem statement
Machine translation, not yet reviewed by a native speaker.
The first line contains the count of numbers n (n ≥ 1), the second — the n integers themselves, separated by spaces.
Print the smallest and the largest of them, separated by a space.
Example
Input:
5
3 1 4 1 5
Output:
1 5
Sign up for free to solve this task right in your browser: code editor, running, test checks and hints.