暴力法求解 #include <stdio.h> void fun(int n){ int ans=0; for(int i=0;i<=n;i++){ int x=i,j=1; while((x/=10)!=0) j++; if(i*i%((int)pow(10,j))==i) ans++; } printf("%d\n",ans); } int main(){ int n; while(scanf("%d",&n)!=EOF){...