The second largest number
Task
The user enters whole numbers. The user enters the numbers one per line and ends with -1, which is not part of the result.
The program prints the second largest number - the second largest of the *distinct* values (for 5, 8, 8, 3 it is 5). If there is no such number, it prints neexistuje (does not exist).
Examples
Input
4 9 2 7 -1
Expected output
7
After you submit, 5 hidden tests will also check your solution: the largest number twice, a single number, no numbers, negative numbers, all equal.
Python starts the first time you run code.
Ctrl+Enter runs the program. Tab indents. Press Esc, then Tab, to leave the editor.
Input (stdin)
Each line = one call to input().
Output
Hints
Try it yourself first. Each hint reveals a little more - and lowers the reward a little.
Signed out, hints are free - but no XP is awarded either.
Solution
The solution unlocks after the last hint.