Submit solution
Points:
3 (partial)
Time limit:
2.0s
Memory limit:
64M
Author:
Problem type
Allowed languages
Java, Lisp, Rust
You're given an array of length . Find all of the values in the array that are larger than the mean of the array, rounded down. You are to output the values from the left-most index of the array to the right-most index.
Input Specification
The first line will contain the integer , the length of the array.
The next lines will each contain an integer, representing the value of that array. These values will all be in between and .
Output Specification
For each number that you find that is larger than the mean of the array rounded down, output it on a separate line.
Sample Input 1
5
1
2
3
4
5
Sample Output 1
4
5
Sample Explanation
The mean of this array is , and the numbers that are larger than that are and .
Sample Input 2
8
5
2
14
29
8
10
11
3
Sample Output 2
14
29
11
Sample Explanation 2
The mean this array is , rounded down to . Thus, only those three values are larger than , thus being the answers.
Comments