int fun(int x){ int a,b=10,c=0; a=x; while(a/10!=0){b*=10;a/=10;} /*判断x是几位数*/ a=x*x; c=(a%b==x)? 1:0; return c;}