杨虎大大


私信TA

用户名:897843079

访问量:2173

签 名:

所有被千夫所指的困难,都是为了淘汰掉懦夫,仅此而已。

等  级
排  名 543
经  验 4308
参赛次数 1
文章发表 4
年  龄 21
在职情况 学生
学  校 成都工业学院
专  业 计算机科学与技术

  自我简介:

解题思路:

注意事项:

参考代码:

#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
#define int long long
using namespace std;
signed main(){
    cout<<0<<"  ";
    for(int i=1;i<=200000;i++){
        int temp=i,temp1=i*i,flag=0;
        while(temp){
            if(temp%10!=temp1%10){
                flag=1;
                break;
            }
            temp/=10;
            temp1/=10;
        }
        if(!flag){
            cout<<i<<"  ";
        }
    }
    return 0;
}

 

0.0分

0 人评分

看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:

编程语言转换

万能编程问答  

代码解释器

代码纠错

SQL生成与解释

  评论区