紫竹


私信TA

用户名:urnachan

访问量:29040

签 名:

等  级
排  名 304
经  验 5441
参赛次数 0
文章发表 72
年  龄 0
在职情况 学生
学  校 合肥工业大学
专  业

  自我简介:

TA的其他文章

#include "stdafx.h"

#include "math.h"

int fun_len(int n)

{

int count=0;

do

{

n /= 10;

count++;

} while (n);

return count;

}

int fun_pow(int n)

{

if (n == 0)

return 1;

if (n > 0)

return 10 * fun_pow(n - 1);

}

int main()

{

int a,b,i,j,k,x,x1,y,y1,L;

scanf("%d %d", &a, &b);

for (i = a; i <= b; i++)

{

L = fun_len(i);

for (j = 1; j < L; j++)

{

x = i % fun_pow(j);

y = i / fun_pow(j);

x1 = sqrt(x);

y1 = sqrt(y);

k = sqrt(i);

if (x == x1*x1 && y == y1*y1 && i==k*k &&x1!=0 && y1!=0)

printf("%d ", i);

}

}

    return 0;

}


 

0.0分

0 人评分

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

编程语言转换

万能编程问答  

代码解释器

代码纠错

SQL生成与解释

  评论区