A number and its square both have the same last three digits. What are the possibilities for those digits?
(In reply to Solution (not necessarily a full list)
is indeed the full list, found by
FOR i = 0 TO 999
sq = i * i
d$ = "000" + LTRIM$(STR$(sq))
n = VAL(RIGHT$(d$, 3))
IF i = n THEN PRINT RIGHT$(d$, 3)
That digits further to the left than the hundreds position could interfere is not a possibility, as one could consider the numbers in base 1000. When squaring a number in any base system, or any multiplication in any base system, multiplying the rightmost digits always results in the rightmost digit of the answer, including base-1000.
Posted by Charlie
on 2007-08-28 15:12:04