Problem A
Apple Abundance
A farmer has $N$ apple trees in her orchard. Each tree produces a certain number of apples during harvest season. She considers a tree to be “abundant” if it produces strictly more apples than the average tree in her orchard.
Given the apple count for each tree, determine how many trees are abundant.
Input
The first line contains a single integer $N$, the number of trees. The second line contains $N$ space-separated integers $a_1, a_2, \ldots , a_N$, where $a_i$ is the number of apples produced by the $i$-th tree.
Output
Output a single integer: the number of abundant trees.
Limits
-
$1 \leq N \leq 1000$
-
$1 \leq a_i \leq 10^6$
| Sample Input 1 | Sample Output 1 |
|---|---|
5 10 20 30 40 50 |
2 |
| Sample Input 2 | Sample Output 2 |
|---|---|
3 5 5 5 |
0 |
| Sample Input 3 | Sample Output 3 |
|---|---|
4 1 2 3 100 |
1 |
