Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
6570 | 詹梓涵 | 质数的和与积 | C++ | Compile Error | 0 MS | 0 KB | 814 | 2025-03-08 09:23:43 |
#include<iostream> // cin\cout #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() #include<algorithm> using namespace std; int main(){ int s,a,b; int m=0; cin>>s; for(int i=2;i<=s/2+1;i++){ a=i; b=s-a; bool f=true; for(int j=2;j*j<=a;j++){ if(a%j==0){ f=false; break; } } if(f==false) continue; f=true; for(int j=2;j*j<=b;j++){ if(b%j==0){ f=false; break; } } if(f==true){ m=max(m,a*b;) } } cout<<m<<endl; return 0; }
Main.cc: In function 'int main()': Main.cc:30:24: error: expected ')' before ';' token m=max(m,a*b;) ^ Main.cc:30:25: error: expected primary-expression before ')' token m=max(m,a*b;) ^ Main.cc:30:25: error: expected ';' before ')' token