Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
96532 | 王思颜 | 方程求解 | C++ | Accepted | 38 MS | 268 KB | 323 | 2024-11-09 11:11:47 |
#include<bits/stdc++.h> using namespace std; int m,n; int main(){ int s = 0; cin>>m>>n; for (int x = 1;x <= m - 1;x++){ for (int y = 1;y <= m - 1;y++){ if (x + y == m && x * y == n){ s = 1; break; } } } if (s == 1){ cout<<"Yes"; } if (s == 0){ cout<<"No"; } return 0; }