Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
6068 | JiangGuangrui | 肥胖问题 | C++ | 解答错误 | 0 | 1 MS | 780 KB | 349 | 2020-08-22 13:55:37 |
#include <iostream> #include <cstdio> using namespace std; int main() { int m; double 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; }