//只通过了70%
#include<iostream>
#include<math.h>
using namespace std;
int main(){
int n;
while(cin >> n){
if(n < 1){
cout << 0 << endl;
}
else{
int r = sqrt(float(n));
int count = 0;
for(int i = 1; i <= r; i++){
int x = sqrt(float(n - i * i));
if((i * i + x * x) == n){
count++;
}
}
cout << 4*count << endl;
}
}
return 0;
}
大神,求指导这个代码为什么只通过70%,错在哪里?