#P5714. 【深基3.例7】肥胖问题

【深基3.例7】肥胖问题

Obesity Problem

Problem Source

Luogu P5714

Problem Description

The BMI (Body Mass Index) is an internationally common standard for measuring whether a person is overweight or underweight. Its formula is mh2\dfrac{m}{h^2}, where mm is body weight (in kilograms) and hh is height (in metres). The categories and judgments are as follows:

  • Less than 18.518.5: underweight, output Underweight;
  • Greater than or equal to 18.518.5 and less than 2424: normal weight, output Normal;
  • Greater than or equal to 2424: obese — not only output the BMI value (in cout's default precision), then a newline, but also output Overweight;

Given weight and height data, judge the body type according to the BMI and output the corresponding judgment.

For non-C++ languages, when outputting, round to six significant digits; if there is a trailing 00 in the fractional part, do not output that trailing 00.

Note that keeping six significant digits is not the same as keeping six decimal places. For example, 123.4567123.4567 should be output as 123.457123.457, and 5432.105432.10 should be output as 5432.15432.1.

Input Format

One line in total.

The first line contains 22 real numbers, m,hm, h, representing body weight (in kg) and height (in m) respectively.

Output Format

Output one line containing a string representing the BMI-based judgment. In particular, follow the statement for the special handling of the Overweight case.

Sample Input 1

70 1.72

Sample Output 1

Normal

Sample Input 2

100 1.68

Sample Output 2

35.4308
Overweight

Hint

  • The BMI formula is given in the statement. Among the four outputs, one must print the BMI value first, then a newline, then the word — re-read the statement to confirm which case and what order.
  • Just print BMI with cout's default format; don't add setprecision (think about why: sample 2 prints 35.4308).
  • Check against the sample: 70 1.72 → Normal.

For all data, 40≤m≤12040\le m \le 120, 1.4≤h≤2.01.4 \le h \le 2.0. The numbers of decimal places in mm and hh do not exceed three.