Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
8096 | 孙文谦 | 肥胖问题 | C++ | 通过 | 100 | 0 MS | 248 KB | 304 | 2020-10-31 15:59:33 |
#include<bits/stdc++.h> using namespace std; int main(){ double bmi,m,h; cin>>m>>h; bmi=m/(h*h); if(bmi<18.5){ cout<<"Underweight"; } else if(bmi>=18.5&&bmi<=24){ cout<<"Normal"; } else if(bmi>24){ cout<<bmi<<endl; cout<<"Overweight"; } return 0; }