1276: (2026)实验1-3B BMI四舍五入后分类 / BMI Rounded to Integer Then Classified
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:88
Solved:23
Description
【中文题面】
输入一个人的体重(kg)和身高(m),按公式 BMI = 体重 / (身高 × 身高) 计算 BMI。
先将 BMI 四舍五入为最接近的整数(只考虑正数,可用 int(bmi + 0.5) 处理),输出该整数;再按以下规则输出分类:
小于 18 输出“偏瘦”;18 到 23 输出“正常”;大于等于 24 输出“超重”。
[English Description]
Input weight (kg) and height (m), compute BMI = weight / (height × height).
Round BMI to the nearest integer (for positive values, int(bmi + 0.5) is acceptable), output that integer, and then classify it:
< 18 => 偏瘦; 18 to 23 => 正常; ≥ 24 => 超重.
输入一个人的体重(kg)和身高(m),按公式 BMI = 体重 / (身高 × 身高) 计算 BMI。
先将 BMI 四舍五入为最接近的整数(只考虑正数,可用 int(bmi + 0.5) 处理),输出该整数;再按以下规则输出分类:
小于 18 输出“偏瘦”;18 到 23 输出“正常”;大于等于 24 输出“超重”。
[English Desc
Input weight (kg) and height (m), compute BMI = weight / (height × height).
Round BMI to the nearest integer (for positive values, int(bmi + 0.5) is acceptable), output that integer, and then classify it:
< 18 => 偏瘦; 18 to 23 => 正常; ≥ 24 => 超重.
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 整数值,第二行为中文分类。
[Output]
Output two lines: the rounded integer BMI and the Chinese category.
输出两行:第一行为四舍五入后的 BMI 整数值,第二行为中文分类。
[Output]
Output two lines: the rounded integer BMI and the Chinese category.
Sample Input Copy
60 1.70
Sample Output Copy
21
正常