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

 Wonderful problem (Posted on 2009-06-07)
“The Square Root of Wonderful” was the name of play on Broadway.

If each letter in WONDERFUL stands for a different digit (zero excluded) and if OODDF, using the same code, represents the square root, then what is the square root of WONDERFUL?

 See The Solution Submitted by pcbouhid Rating: 2.0000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 solution (QuickBasic) | Comment 2 of 7 |

DEFDBL A-Z
FOR o = 1 TO 9
FOR d = 0 TO 9
IF d <> o THEN
FOR f = 0 TO 9
IF f <> o AND f <> d THEN
ooddf = o * 11000 + d * 110 + f
wonderful = ooddf * ooddf
o2 = INT(wonderful / 10000000) MOD 10
d2 = INT(wonderful / 100000) MOD 10
f2 = INT(wonderful / 100) MOD 10
IF o2 = o AND d2 = d AND f2 = f THEN
PRINT ooddf, wonderful
END IF
END IF
NEXT
END IF
NEXT
NEXT

22887         523814769

No other numbers printed out and this one has unique digits for wonderful, so 22887 is the square root of wonderful.

 Posted by Charlie on 2009-06-07 16:25:10

 Search: Search body:
Forums (0)