慕粉2350305356
#include<stdio.h>#include<math.h>int main(){ float rSquare; int x,y,temp,res,count = 0; scanf("%f",&rSquare); x=(int)sqrt(rSquare); y=(int)sqrt(rSquare); for(int i=0;i<=x;i++) { for (int j = 0; j <=y; j++) { if(i*i+j*j==rSquare) count++; } } if(sqrt(rSquare)==(long)sqrt(rSquare)) { temp = count-2; res =temp*4+4; printf("%d",res); } else { res = count*4; printf("%d",res); } return 0;}/* 又一个被开发者猩球残害的新同事 */