For Loop. Typical tasks




Hint:
You may notice that the loop variable changes in order and can serve as an indication of how we enter the number.
Therefore, you can save the value of the loop variable when a certain condition

Task
Time limit: 1000 ms,
Memory limit: 256 Mb

Given the number N.
N numbers are input.
It is necessary to display the position of the minimum and maximum numbers among all numbers.

Input:
in the first line the number N is entered - the number of numbers (N <= 100)
then there are N numbers, one per line (all numbers are integers not exceeding 10,000 in absolute value)

Output:
output two numbers with a space, first the position number of the minimum number, then after 1 space, the position number of the maximum number.

Example:
Input: 
5
-2
1
2
3
0
Output: 
1 4

With difficulties:
The theoretical card contains a hint.
Prohibited statements:min;max;sort

Auto CHOOSE THE PROGRAMMING NECESSARY LANGUAGE!
Attach the program source file:
or enter the source code in the language:

Rules for designing programs and a list of errors during automatic task verification
           

Results: