| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 152368 | 李鸣 | 方程求解 | C++ | Accepted | 1 MS | 268 KB | 536 | 2026-04-25 16:23:55 |
#include <iostream> #include <cmath> using namespace std; int main() { int m, n; // 多组输入 m(和)、n(积) while (cin >> m >> n) { int d = m * m - 4 * n; // 判别式 if (d < 0) { cout << "No" << endl; continue; } int sqrt_d = sqrt(d); // 判断是否是完全平方数 if (sqrt_d * sqrt_d == d) { cout << "Yes" << endl; } else { cout << "No" << endl; } } return 0; }