提交时间:2023-02-02 22:27:49

运行 ID: 7265

#include<iostream> using namespace std; int main(){ for(int i=1;i<=256;i++){ if(i*i<10){ cout<<i<<endl; } else if(i*i<100&&i*i/10==i*i%10){ cout<<i<<endl; } else if(i*i<1000&&i*i/100==i*i%10){ cout<<i<<endl; } else if(i*i<10000&&i*i/1000==i*i%10&&i*i/100-i*i/1000*10==i*i/10-i*i/100*10){ cout<<i<<endl; } else if(i*i/10000==i*i%10&&i*i/10-i*i/100*10==i*i/1000-i*i/10000*10){ cout<<i<<endl; } } return 0; }