#K3786. Fatality Rate Calculation
Fatality Rate Calculation
Fatality Rate Calculation
You are given the number of confirmed cases and deaths for multiple test cases. Your task is to compute the fatality rate for each test case. The fatality rate is defined as:
\(\text{fatality rate} = \frac{\text{deaths}}{\text{confirmed cases}} \times 100\)
The result should be expressed as a percentage rounded to two decimal places.
For example, if the input is 10000 500
, then the fatality rate is 5.00
.
inputFormat
The first line of input contains an integer T
representing the number of test cases.
Each of the next T
lines contains two space-separated integers: the number of confirmed cases and the number of deaths.
You may assume that the number of confirmed cases is always at least 1.
outputFormat
For each test case, output a single line containing the fatality rate as a percentage rounded to two decimal places.
## sample2
10000 500
15000 750
5.00
5.00
</p>