|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
SPOJ time: 2012-02-04 19:22:35 |
BMIProblem code: HS09BMI
Julia and Robert are preparing a new web portal for teenagers. One of the elements of their website will be a BMI (Body Mass Index) calculator. They have decided to compare the data obtained from their users to percentile distributions, taken from a reference paper.
Now Julia and Robert would like to make sure that their BMI calculator, which compares the user input to the data provided in the table above, is working correctly. Could you help them verify if this is so? InputFirst, one integer denoting the number of tests. For each test in separate lines: one character denoting the gender: W for girls and M for boys; and three integers: a (13 <= a <= 19) - age in years, d (70 <= d <= 250) the person's height in centimeters, and m (25 <= m <= 250) the person's weight in kilograms. OutputFor each test case, first output the BMI computed with one digit of precision (rounding to the nearest digit, choosing the even one in case of a tie) and the word: "WARNING", if the computed BMI is below the fifth percentile or above the ninety-fifth. ExampleInput: 3 M 14 167 55 M 17 159 75 W 18 173 79 Output: 19.7 29.7 WARNING 26.4 ScoringThis is a test problem and you will receive no points for solving it. However, at 12:00 on Saturday, September
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||