delete pics to save space
This commit is contained in:
23
history_source/ccf 入门篇/U5/5.2.5.cpp
Normal file
23
history_source/ccf 入门篇/U5/5.2.5.cpp
Normal file
@ -0,0 +1,23 @@
|
||||
#include<iostream>
|
||||
#include<cmath>
|
||||
using namespace std;
|
||||
bool pan(int a)
|
||||
{
|
||||
do
|
||||
{
|
||||
if(a%10==0) return 0;
|
||||
a/=10;
|
||||
}
|
||||
while(a>0);
|
||||
return 1;
|
||||
}
|
||||
int main()
|
||||
{
|
||||
int x=sqrt(111111111)+1,a;
|
||||
for(;x*x<=999999999;x++)
|
||||
{
|
||||
a=x*x;
|
||||
if(pan(a)) cout<<x<<"^2="<<a<<endl;
|
||||
}
|
||||
while(true);
|
||||
}
|
Reference in New Issue
Block a user