Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
109919 程余天皓 质数的和与积 C++ Compile Error 0 MS 0 KB 348 2025-02-13 12:14:13

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; bool zs(int x) { if(x<2) { return 0; } for(int i=2; i*i<=x; i++) { if(x%i==0) { return 0; } } return 1; } int S; int mx=0; int main() { cin>>S; for(int x=2; x<=S; x++) { if(zs(x)&&zs(S-x)){ if(x*(S-x)>mx){ mx=x*(S-x); } } } cout<<x; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:25:8: error: 'x' was not declared in this scope
  cout<