package com.xijiaopractice;
public class Test13 {
/*
* 题目:一个整数,它加上100后是一个完全平方数,
* 再加上168又是一个完全平方数,请问该 数是多少?
*/
public static void main(String[] args) {
double b=0;
double c=0;
for (int a = 0; a < 100000000; a++) {
b= Math.sqrt(a+100);
c= Math.sqrt(a+100+168);
if(b%1==0&&c%1==0){
System.out.println(a);
}
}
}
}
public class Test13 {
/*
* 题目:一个整数,它加上100后是一个完全平方数,
* 再加上168又是一个完全平方数,请问该 数是多少?
*/
public static void main(String[] args) {
double b=0;
double c=0;
for (int a = 0; a < 100000000; a++) {
b= Math.sqrt(a+100);
c= Math.sqrt(a+100+168);
if(b%1==0&&c%1==0){
System.out.println(a);
}
}
}
}