首页 > 其他分享 >27th

27th

时间:2023-05-29 14:24:16浏览次数:21  
标签:count 10 90625 int 27th long 几位数

就上次保守数

因为 90625*90625 超出了int 范围 ,所以改用long long 
#include <bits/stdc++.h>
using namespace std;
int main(){
for(long long 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 ;
}

标签:count,10,90625,int,27th,long,几位数
From: https://www.cnblogs.com/wcy1111/p/17440279.html

相关文章

  • 25th-27th 2022/7/28,2022/7/29,2022/7/30 模拟赛总结15-17
    首先这次是补,因为有个垃圾将我的总结删了它的名字不配出现在我的总结中这三次其实都不算好主要问题是没睡好,读题不仔细以及并没有拼尽全力去打这几点总结应该注重休......