Pseudocode Compiler
Practice

Count Above Average

MEDIUMArrays

Read an integer N (1 ≤ N ≤ 10), then read N integers into an array. Compute the integer average (sum DIV N). Count and output how many values are strictly greater than the average.

Input: N on the first line, then N integers one per line. Output: The count of values above the integer average.

Example:

Input:  5
        10
        20
        30
        40
        50
Output: 2

(sum = 150, average = 30, values above 30: 40, 50 → count = 2)

Premium is coming soon. All grading features are currently unlocked.

Sample Test Cases

Test 1: Average = 30
Inputs: 5, 10, 20, 30, 40, 50
Expected: 2
Test 2: Average = 2 (int div)
Inputs: 4, 1, 2, 3, 4
Expected: 2
Test 3: All equal
Inputs: 3, 5, 5, 5
Expected: 0
Press Ctrl+Enter to run your code
or Ctrl+Shift+Enter to grade