测试点2是一个大数,开始预设数组为s[10],不过。改为s[100]后过。
测试点3为1
#include <iostream>
#include <math.h>
using namespace std;
int Judge(int n)//判断是否为质数
{
int i;
if (n < 2)return 0;
if (n == 2)return 1;
for (i = 2; i <= sqrt(n); i++)
{
if (!n%i)return 0;
}
return