Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
119508 潘明川 方程求解 C++ Compile Error 0 MS 0 KB 1114 2025-05-17 17:27:17

Tests(0/0):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int n,m; cin>>n>>m; for(int x=0;x<=n;x++) { for(int y=0;y<=n;y++) { if(x+y==n&&x*y==m) { cout<<"YES"<<endl; return 0; } } } cout<<"NO"<<endl; return 0; }#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int n,m; cin>>n>>m; for(int x=0;x<=n;x++) { for(int y=0;y<=n;y++) { if(x+y==n&&x*y==m) { cout<<"YES"<<endl; return 0; } } } cout<<"NO"<<endl; return 0; }


Run Info:

Main.cc:27:2: error: stray '#' in program
 }#include  // cin\cout\endl
  ^
Main.cc:27:3: error: 'include' does not name a type
 }#include  // cin\cout\endl
   ^
Main.cc: In function 'int main()':
Main.cc:33:5: error: redefinition of 'int main()'
 int main(){
     ^
Main.cc:7:5: note: 'int main()' previously defined here
 int main(){
     ^