守形数

#include<iostream>
#include<cstdio>
#include<algorithm>

using namespace std;
int mp[105][105];
int main(){
    for(int i=2;i<=1000;i++){
        int t=i*i,m;
        if(i<10)m=10;
        else if(i>=10&&i<100)m=100;
        else m=1000;
        if(t%m==i)cout<<i<<endl;
    }
}

 

posted @ 2017-08-30 19:32  Ed_Sheeran  阅读(203)  评论(0编辑  收藏  举报