All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 The Last Three Digits (Posted on 2007-08-28)
A number and its square both have the same last three digits. What are the possibilities for those digits?

 See The Solution Submitted by Brian Smith Rating: 4.0000 (3 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 re: No, a fuller List [part spoiler?] | Comment 5 of 8 |
(In reply to No, a fuller List [part spoiler?] by Vernon Lewis)

FOR i = 0 TO 999
sq = i * i
d1\$ = RIGHT\$("000" + LTRIM\$(STR\$(i)), 3)
d\$ = RIGHT\$("000" + LTRIM\$(STR\$(sq)), 3)
s\$ = d\$
good = 1
FOR j = 1 TO 3
ix = INSTR(s\$, MID\$(d1\$, j, 1))
IF ix = 0 THEN
good = 0
EXIT FOR
ELSE
s\$ = LEFT\$(s\$, ix - 1) + MID\$(s\$, ix + 1)
END IF
NEXT
IF good THEN
PRINT d1\$, d\$
END IF
NEXT

` i            i^2 mod 1000000           000001           001010           100050           500060           600205           025376           376421           241625           625963           369`

 Posted by Charlie on 2007-08-28 22:29:38
Please log in:
 Login: Password: Remember me: Sign up! | Forgot password

 Search: Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (6)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2018 by Animus Pactum Consulting. All rights reserved. Privacy Information