#K95922. Counting Invalid Rainfall Predictions
Counting Invalid Rainfall Predictions
Counting Invalid Rainfall Predictions
You are given several test cases. In each test case, you are given the number of days N and a sequence of predicted rainfall amounts for those days. A prediction is considered invalid if it is less than 0 or greater than 100.
Your task is to compute the number of invalid predictions for each test case.
Note: All formulas should be expressed in LaTeX. For example, a prediction p
is valid if \(0 \leq p \leq 100\), otherwise it is invalid.
inputFormat
The first line of input contains a single integer \(T\) representing the number of test cases.
The description of each test case is as follows:
- The first line contains an integer \(N\) representing the number of days.
- The second line contains \(N\) space-separated integers representing the rainfall predictions for each day.
outputFormat
Output \(T\) lines. Each line contains a single integer representing the number of invalid predictions for the corresponding test case.
## sample2
5
10 20 -30 110 50
3
70 85 200
2
1
</p>