ID:我是王小明
版权声明:本文为博主原创文章,未经博主允许不得转载。
蓝桥杯素数等差数列问题
问题描述:大体是长度为10的素数等差数列,求最小共差
#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
bool isPrim(int x) //判断素数函数
{
if(x==2) return true;
int flag=1;
for
ID:我是王小明
版权声明:本文为博主原创文章,未经博主允许不得转载。
问题描述:大体是长度为10的素数等差数列,求最小共差
#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
bool isPrim(int x) //判断素数函数
{
if(x==2) return true;
int flag=1;
for