【问题描述】
两个质数的和是S,它们的积最大是多少?
【输入格式】:
一个不大于10000的正整数S,为两个质数的和。
【输出格式】:
一个整数,为两个质数的最大乘积。数据保证有解。
【输入样例】:
50
【输出样例】:
589
【参考程序】
#include <cstdio>
#include <iostream>
#include <cmath> // 使用sqrt()须调用cmath库
using namespace std;
bool sh(int x
【问题描述】
两个质数的和是S,它们的积最大是多少?
【输入格式】:
一个不大于10000的正整数S,为两个质数的和。
【输出格式】:
一个整数,为两个质数的最大乘积。数据保证有解。
【输入样例】:
50
【输出样例】:
589
【参考程序】
#include <cstdio>
#include <iostream>
#include <cmath> // 使用sqrt()须调用cmath库
using namespace std;
bool sh(int x