#K45772. Dynamic Passing Threshold
Dynamic Passing Threshold
Dynamic Passing Threshold
Given a number of test cases, each test case describes a class with a total number of students and a passing percentage. The task is to compute the maximum number of students that can pass according to a dynamically changing passing criterion. Although a list of marks is provided for each test case, it is not used in the computation.
The maximum number of passing students is calculated using the formula \(k = \lfloor \frac{N \times P}{100} \rfloor\), where \(N\) is the number of students and \(P\) is the passing percentage.
For each test case, output the computed value on a new line.
inputFormat
The first line of input contains an integer (T), the number of test cases. For each test case, the first line contains two integers (N) and (P) where (N) is the number of students and (P) is the passing percentage. The following line contains (N) space-separated integers representing students' marks (which are provided but not used in the calculation).
outputFormat
For each test case, output a single integer: the maximum number of students that can pass, computed as (\lfloor \frac{N \times P}{100} \rfloor). Each result should be printed on a new line.## sample
1
5 40
50 80 30 90 100
2
</p>