我们可以通过计算机验证其在有限范围的正确性。 代码如下: #include stdio.h #include math.h int f(int n, int a[], int idx) {  if(n==0) return 1;   if(idx==4)  return 0;  //超出数组范围 出错  for(int i=(int)sqrt(n); i=1; i--)  {   a[idx] = i;   if(f(n-i*i, a, idx+1) == 1)  return 1;  // 递归调用  }  r...
[ 查看全文 ]