Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
151486 付博苏逸 方程求解 C++ Compile Error 0 MS 0 KB 314 2026-04-12 15:25:29

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int n,m,flog=0; cin>>n>>m; for(int x=1;x<=n;x++){ for(int y=1;y<=n;y++){ if(x+y==m&&x*y==n){ cout<<"Yes"; flog=1; return 0; }else (flog==0){ cout<<"No"; return 0; } } } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:12:20: error: expected ';' before '{' token
     }else (flog==0){
                    ^