Finding Two Lows
Problem
The array stores information about the number of people living on each of the 15 floors of the house (on the first floor — in the zero element of the array, on the second — in the first, etc.). Determine the two floors on which the least number of people live. (If the minimum number of inhabitants is the same on 2 or more floors, then display the smallest floors).
Input
Array elements are entered in one line separated by a space.
Imprint
Print two numbers on one line separated by a space, first the floor with the smallest number of people. With the same number of inhabitants - the smallest floor first.
Example
# |
Input |
Output |
1 |
20 8 13 25 29 0 10 4 31 24 11 24 27 23 11 |
6 8 |
Запрещенные операторы: sort
; min
; max
; reverse
; count