1275: (2026)实验1-3A BMI计算与分类 / BMI Calculation and Classification
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:82
Solved:23
Description
【中文题面】
输入一个人的体重(kg)和身高(m),按公式 BMI = 体重 / (身高 × 身高) 计算 BMI。
先输出 BMI 值,保留 1 位小数;再按以下规则输出分类:
BMI < 18.5 输出“偏瘦”;18.5 ≤ BMI < 24.0 输出“正常”;BMI ≥ 24.0 输出“超重”。
[English Description]
Input weight (kg) and height (m). Compute BMI = weight / (height × height).
First output the BMI value with 1 decimal place, then output the category:
BMI < 18.5 => 偏瘦; 18.5 ≤ BMI < 24.0 => 正常; BMI ≥ 24.0 => 超重.
输入一个人的体重(kg)和身高(m),按公式 BMI = 体重 / (身高 × 身高) 计算 BMI。
先输出 BMI 值,保留 1 位小数;再按以下规则输出分类:
BMI < 18.5 输出“偏瘦”;18.5 ≤ BMI < 24.0 输出“正常”;BMI ≥ 24.0 输出“超重”。
[English Desc
Input weight (kg) and height (m). Compute BMI = weight / (height × height).
First output the BMI value with 1 decimal place, then output the category:
BMI < 18.5 => 偏瘦; 18.5 ≤ BMI < 24.0 => 正常; BMI ≥ 24.0 => 超重.
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 值(保留 1 位小数),第二行为中文分类。
[Output]
Output two lines: the BMI value (1 decimal place) and the Chinese category.
输出两行:第一行为 BMI 值(保留 1 位小数),第二行为中文分类。
[Output]
Output two lines: the BMI value (1 decimal place) and the Chinese category.
Sample Input Copy
60 1.70
Sample Output Copy
20.8
正常
HINT
建议使用 double,输出格式可用 fixed 和 setprecision。