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

Home > Numbers
My stock (Posted on 2011-03-19) Difficulty: 3 of 5
What is the cubic root of INVENTORY?

See The Solution Submitted by Ady TZIDON    
Rating: 4.3333 (3 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 5

DEFDBL A-Z
FOR cr = 465 TO 999
  tst$ = LTRIM$(STR$(cr * cr * cr))
  good = 1
  FOR i = 1 TO 8
    IF i <> 2 THEN
      IF INSTR(MID$(tst$, i + 1), MID$(tst$, i, 1)) THEN good = 0: EXIT FOR
    ELSE
      IF INSTR(MID$(tst$, i + 1), MID$(tst$, i, 1)) <> 3 THEN good = 0: EXIT FOR
    END IF
  NEXT
  IF good THEN
   cube$ = LTRIM$(STR$(cr * cr * cr))
   root$ = LTRIM$(STR$(cr))
   FOR i = 1 TO 3
     ix = INSTR(cube$, MID$(root$, i, 1))
     PRINT MID$("INVENTORY", ix, 1);
   NEXT
   PRINT
   PRINT cr * cr * cr, cr
  END IF
NEXT

The first line of the output is:

RYE

That's your stock.

Actual numbers left out so as not to be a spoiler for the alphametic.


  Posted by Charlie on 2011-03-19 14:04:18
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 (7)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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