26th

保守数

源代码


#include <bits/stdc++.h>
using namespace std;
int main(){
for(int i=0;i<100000;i++){
int t=i;
int count=0;
while(t!=0){
t/=10;
count++;//计算i是几位数
}
int k=pow(10,count);//截取后面的几位数 10 count次方
if(i*i%k==i)
cout<<i<<endl;
}
return 0 ;
}

但是 90625 没有输出

明天细看

 

posted @ 2023-05-25 16:57  晨观夕  阅读(32)  评论(0编辑  收藏  举报