BMI
Time: 1 s
Memory: 125 MB
Memory: 125 MB
Body mass index (BMI) is a measure of body fat based on height and weight that applies to adult men and women. This is the fomular to calculate bmi \(bmi = \frac{m}{h^2}\). With m is the weight in kilograms and h is the height in meter.
You need to programming a program to calculate bmi.
You need to programming a program to calculate bmi.
Input
Two numbers m and h seperated by a space. m is the weight in kilograms and h is the height in centimeter.
Constraint
\(0 < m < 1000\);\(0 < h < 2000\)
Output
Only a number is the bmi number. Write as a decimal number with 2 digits after the decimal point.
Examples
| Input | Output |
|---|---|
|
70 160
|
27.34
|
Notes
You can use cout << fixed << setprecision(x) << var; to write the number with digit.x is the number of digits after the decimal point, var is the variable.
This command use iomanip library, you need to define it before you use.
Problem Info
| Problem ID | 419 |
| Time Limit | 1000 ms |
| Memory Limit | 128000 KB |
| Moderators | pixelarco |
Statistics
Submit
You need to Login or Registration for submit your solution