No.1238 Selective Class
Problem Statement
A cram school has $N$ students, and the score of the $i$-th student on an achievement test is $A_i$.
From these $N$ students, at least $1$ student will be chosen to form a selective class.
However, the following condition must be satisfied.
- The average achievement test score of the students chosen for the selective class is at least $K$ points.
Input
$N\ K$ $A_1\ A_2\ \dots\ A_N$
- $1 \le N \le 100$
- $0 \le K \le 100$
- $0 \le A_i \le 100\ (1 \le i \le N)$
- All input values are integers.
Output
Print the answer on $1$ line, followed by a newline.
Sample
Sample 1
Input
2 2 1 3
Output
2
If only student $1$ is chosen, the average score of the selective class is $1$ point.
If only student $2$ is chosen, the average score of the selective class is $3$ points.
If student $1$ and student $2$ are chosen, the average score of the selective class is $2$ points.
Thus, there are $2$ ways to choose the students so that the average score of the selective class is at least $2$ points,
so print $2$.
Sample 2
Input
3 14 15 9 26
Output
5
Sample 3
Input
9 12 25 48 7 36 28 35 82 43 5
Output
508
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
piddy
platinum