#C7966. Counting Friends Passing Threshold
Counting Friends Passing Threshold
Counting Friends Passing Threshold
You are given several test cases. In each test case, you are provided with the number of friends \( M \), a threshold score \( Y \), and a list of \( M \) scores. Your task is to count the number of friends whose score is greater than or equal to \( Y \) for each test case.
Example:
Input: 3 5 50 10 60 70 80 90 4 85 85 85 85 85 6 30 5 10 15 20 25 35</p>Output: 4 4 1
In the above example, for the first test case, there are 4 scores at least 50; in the second, 4 scores equal to 85; and in the third, only 1 score is at least 30.
inputFormat
The input is read from stdin and has the following format:
- The first line contains an integer \( T \) indicating the number of test cases.
- For each test case, the first line contains two integers \( M \) and \( Y \), where \( M \) is the number of friends and \( Y \) is the minimum required score.
- The next line contains \( M \) space-separated integers representing the scores of the friends.
outputFormat
For each test case, output a single integer on a new line representing the number of friends with scores greater than or equal to \( Y \). The output should be written to stdout.
## sample3
5 50
10 60 70 80 90
4 85
85 85 85 85
6 30
5 10 15 20 25 35
4
4
1
</p>