#include
int main(void)
{
long n, p, t;
long i, j;
int c;
printf("input the number: ");
scanf("%ld", &n);
while(n != 0)
{
c = 0;
for (i = 1; i n)
{
break;
}
}
}
if (c == 0)
printf("NONE");
printf("ninput the number: ");
scanf("%ld", &n);
}
}
输入数字开始计算,输入0 结束程序
的确出了穷举法,还没有想出更好的方法,还在考虑中...