public class lianxi13 { public static void main(String[] args) { for (int n = -100; n <= Integer.MAX_VALUE; n++ ) { if (Math.sqrt(n+100) % 1 == 0) { if (Math.sqrt(n+268) % 1 == 0) { System.out.println("所求的数字为:" +n); } } } } }
时间: 2024-11-15 22:33:29
public class lianxi13 { public static void main(String[] args) { for (int n = -100; n <= Integer.MAX_VALUE; n++ ) { if (Math.sqrt(n+100) % 1 == 0) { if (Math.sqrt(n+268) % 1 == 0) { System.out.println("所求的数字为:" +n); } } } } }