1277: (2026)实验1-3C BMI等级编号 / BMI Level Code
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:83
Solved:29
Description
【中文题面】
输入一个人的体重(kg)和身高(m),按公式 BMI = 体重 / (身高 × 身高) 计算 BMI。
先输出 BMI 值,保留 2 位小数;再按以下规则输出等级编号:
BMI < 18.5 输出 1;18.5 ≤ BMI < 24.0 输出 2;BMI ≥ 24.0 输出 3。
[English Description]
Input weight (kg) and height (m), compute BMI = weight / (height × height).
First output BMI with 2 decimal places, then output a level code:
BMI < 18.5 => 1; 18.5 ≤ BMI < 24.0 => 2; BMI ≥ 24.0 => 3.
输入一个人的体重(kg)和身高(m),按公式 BMI = 体重 / (身高 × 身高) 计算 BMI。
先输出 BMI 值,保留 2 位小数;再按以下规则输出等级编号:
BMI < 18.5 输出 1;18.5 ≤ BMI < 24.0 输出 2;BMI ≥ 24.0 输出 3。
[English Desc
Input weight (kg) and height (m), compute BMI = weight / (height × height).
First output BMI with 2 decimal places, then output a level code:
BMI < 18.5 => 1; 18.5 ≤ BMI < 24.0 => 2; BMI ≥ 24.0 => 3.
Input
【输入】
输入两个实数,分别表示体重(kg)和身高(m)。
[Input]
Two real numbers: weight in kg and height in meters.
输入两个实数,分别表示体重(kg)和身高(m)。
[Input]
Two real numbers: weight in kg and height in meters.
Output
【输出】
输出两行:第一行为 BMI 值(保留 2 位小数),第二行为等级编号。
[Output]
Output two lines: the BMI value (2 decimal places) and the level code.
输出两行:第一行为 BMI 值(保留 2 位小数),第二行为等级编号。
[Output]
Output two lines: the BMI value (2 decimal places) and the level code.
Sample Input Copy
75 1.80
Sample Output Copy
23.15
2