625这个数字很特别,625的平方等于390625,刚好其末3位是625本身。除了625,还有其它的3位数有这个特征吗?
#include<bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(0);
for(int i = 100;i<=999;i++){
if( (i * i) % 1000 == i){
cout<<i<<endl;
}
}
return 0;
}
625这个数字很特别,625的平方等于390625,刚好其末3位是625本身。除了625,还有其它的3位数有这个特征吗?
#include<bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(0);
for(int i = 100;i<=999;i++){
if( (i * i) % 1000 == i){
cout<<i<<endl;
}
}
return 0;
}