The age of the two old people: 98, 97;
Age of two young people: 2217;
Age of two middle-aged people: 3431;
The fourth possible age combination is: 14 years old, 1 year old;
The algorithm is simple. The square difference between the two ages is 195, which means (a+b) (a-b) = 195.
It is a multiplication relationship, so first find the divisor of 195 (that is, 195/(a+b) must be an integer), and it is easy to know that * * of 195 is about1respectively; 3; 5; 13 four,
So we have the formula:
(1). (a-b) =1(a+b) =195/=195 Solvable: a = 98b=97.
(2). (A-B) = 3 (A+B) =195/3 = 65 Solvable: a = 34b=3 1
(3). (A-B) = 5 (A+B) =195/5 = 39 Solvable: a = 22b= 17.
(4). (a-b) =13 (a+b) =195/13 =15 Solvable: A =14; b= 1