import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc= new Scanner(System.in); int a=sc.nextInt(); int b=sc.nextInt(); for (int i = 1; ; i++) { long n=(long)i*i; if(n<a)continue; if(n>b) break; int len=(n+"").length(); for (int j =1;j <len; j++) { String s=n+""; long m=Long.parseLong(s.substring(0,j)); long k=Long.parseLong(s.substring(j,len)); if(Math.sqrt(m)%1==0&&Math.sqrt(k)%1==0&&m>0&&k>0){ System.out.println(n);break; } } } } }
0.0分
2 人评分
C二级辅导-温度转换 (C语言代码)浏览:492 |
倒杨辉三角形 (C语言代码)浏览:3908 |
字符串的输入输出处理 (C语言代码)浏览:2021 |
C语言程序设计教程(第三版)课后习题10.5 (C语言代码)浏览:733 |
Hello, world! (C语言代码)浏览:1202 |
WU-图形输出 (C++代码)浏览:802 |
哥德巴赫曾猜测 (C语言代码)浏览:2350 |
Hello, world! (C++代码)浏览:1745 |
C语言训练-数字母 (C语言代码)浏览:608 |
数对 (C语言代码)浏览:702 |