pta里面提交时报错怎么办(计算梅森数)
#include<math.h>
#include<stdio.h>
int main()
{
int n,h,f;
scanf("%d", &n);
int m = 0;
for ( f = 2; f <= n; f++)
{
int c = 0;
int j = 1;
for (j = 2, h = 1; j <= f; j++)
{
c = pow(2, f) - 1;
if (c % j == 0)
{
h = 0;
break;
}
}
if (h == 1)
{
printf("%d\n", c);
m++;
}
}
if (m == 0)printf("None\n");
}