#include<bits/stdc++.h>
using namespace std;
int main()
{
int temp1,temp2,count=0;
int n;
cin>>n;
for(int i=0;i<=n;i++)
{
temp1=i;
temp2=i*i;
while(temp1)
{
if(temp1%10!=temp2%10)
{
break;
}
temp1=temp1/10;
temp2=temp2/10;
}
if(temp1==0)
{
count++;
}
}
cout<<count<<endl;
}
HJ99自守数
最新推荐文章于 2024-09-28 22:05:59 发布