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 @   晨观夕  阅读(43)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
点击右上角即可分享
微信分享提示