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

Home > Numbers
A DEEP ROOT Problem (Posted on 2006-09-17) Difficulty: 3 of 5
A four digit positive decimal number DEEP ( in which each of the letters D, E and P represent a different digit) is expressed in base 7, base 6 and base 5. Treating these expressions as decimal numbers, we add them together and observe that the total is 20000. What does DEEP represent?

Another four digit positive decimal number ROOT ( in which each of the letters R, O and T represent a different digit) is expressed in base 7, base 6 and base 5. Treating these expressions as decimal numbers, we add them together and observe that the total is 54321. What does ROOT represent?

See The Solution Submitted by K Sengupta    
Rating: 3.5000 (2 votes)

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

When 1006 is expressed in bases 7, 6 and 5, the representations are:

base representation
 7   2635
 6   4354
 5 13011

When those representations are treated as if they were decimal, the total is 20,000.

When 2337 is expressed in bases 7, 6 and 5, the representations are:

base representation
 7  6546
 6 14453
 5 33322

When those representations are treated as if they were decimal, the total is 54,321.

FOR d = 1 TO 9
FOR e = 0 TO 9
 IF e <> d THEN
  FOR p = 0 TO 9
   IF p <> d AND p <> e THEN
    deep = d * 1000 + e * 110 + p
    n = deep
    b7$ = ""
    DO
      r = n MOD 7
      n = n \\ 7
      b7$ = LTRIM$(STR$(r)) + b7$
    LOOP UNTIL n = 0
    n = deep
    b6$ = ""
    DO
      r = n MOD 6
      n = n \\ 6
      b6$ = LTRIM$(STR$(r)) + b6$
    LOOP UNTIL n = 0
    n = deep
    b5$ = ""
    DO
      r = n MOD 5
      n = n \\ 5
      b5$ = LTRIM$(STR$(r)) + b5$
    LOOP UNTIL n = 0
    tot = VAL(b7$) + VAL(b6$) + VAL(b5$)
  
    IF tot = 20000 THEN
     PRINT d; e; e; p
     b7$ = RIGHT$(SPACE$(6) + b7$, 5)
     b6$ = RIGHT$(SPACE$(6) + b6$, 5)
     b5$ = RIGHT$(SPACE$(6) + b5$, 5)
     PRINT 7; b7$: PRINT 6; b6$: PRINT 5; b5$
    END IF
   END IF
  NEXT
 END IF
NEXT
NEXT

Since variable names are not important, the same program works for the second part, just by replacing the 20000 with 54321.

 

Edited on September 17, 2006, 2:00 pm
  Posted by Charlie on 2006-09-17 13:55:22

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 (14)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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