← Problem book: C
Lesson 63 of 96 · 10 XP
Smallest positive
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 positive number in the sequence. If there are no positive numbers, print NO.
Example
Input:
5
-3 4 1 -1 7
Output:
1
Sign up for free to solve this task right in your browser: code editor, running, test checks and hints.