Run ID:109913
提交时间:2025-02-13 12:06:07
#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 main(){ int s; int mx=0; 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<<mx; return 0; }