Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
6081 | JiangGuangrui | 肥胖问题 | C++ | 通过 | 100 | 1 MS | 800 KB | 342 | 2020-08-22 14:46:07 |
#include <iostream> #include <cstdio> using namespace std; int main() { double m,h,s; cin >> m >> h; s = m / (h * h); if(s < 18.5) { cout << "Underweight" <<endl; } if(s >= 18.5 && s < 24) { cout << "Normal" <<endl; } if(s >= 24) { cout << s <<endl; cout << "Overweight" <<endl; } return 0; }