A four digit number is squared to form an eight digit number. The center four digits of that square form the four digit number. Find all possible four digit numbers.
(If 'abcd' was the four digit number, then the eight digit number would look like 'wxabcdyz'.)
(In reply to
re: Excel Solution by Sandeep)
Aside from the obvious listing of the number and the square, I started by taking the floor of the square divided by 100. So, assuming the square is in B1:
=FLOOR(B1/100,1)
This removes the lower two digits. Then, I just did a mod to remove the upper two digits: =MOD(C1,10000). A final IF statement if the two are equal and a sort shows you where exactly the solutions are.
|
Posted by Eric
on 2004-11-29 14:16:49 |