/* Note:Your choice is C IDE */
#include "stdio.h"
main()
{
float x,y,a,b,c,d,h;
scanf("%f%f",&x,&y);
a=(x-2.00)*(x-2.00)+(y-2.00)*(y-2.00);
b=(x+2.00)*(x+2.00)+(y-2.00)*(y-2.00);
c=(x+2.00)*(x+2.00)+(y+2.00)*(y+2.00);
d=(x-2.00)*(x-2.00)+(y+2.00)*(y+2.00);
if(a<=1) { h=(10.00/1.00)*(1.00-sqrt(a));printf("%lf",h);}
if(b<=1) { h=(10.00/1.00)*(1.00-sqrt(b));printf("%lf",h);}
if(c<=1) { h=(10.00/1.00)*(1.00-sqrt(c));printf("%lf",h);}
if(d<=1){ h=(10.00/1.00)*(1.00-sqrt(d));printf("%lf",h);}
else printf("0");
}
这个呢