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

Home > Numbers
123456 (Posted on 2005-07-04) Difficulty: 2 of 5
What six digit number added to itself five times will give a sum each time having the same 6 digits as the original number?

(It's not 000000.)

See The Solution Submitted by Erik O.    
Rating: 3.4000 (5 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Trial and Error | Comment 3 of 21 |
(In reply to Wild guess by Penny)

Answer same as Penny's, from

DEFLNG A-Z
FOR d1 = 1 TO 9
 used(d1) = 1
 t1 = d1 * 100000
FOR d2 = 0 TO 9
 IF used(d2) = 0 THEN
  used(d2) = 1
  t2 = t1 + d2 * 10000
FOR d3 = 0 TO 9
 IF used(d3) = 0 THEN
  used(d3) = 1
  t3 = t2 + d3 * 1000
FOR d4 = 0 TO 9
 IF used(d4) = 0 THEN
  used(d4) = 1
  t4 = t3 + d4 * 100
FOR d5 = 0 TO 9
 IF used(d5) = 0 THEN
  used(d5) = 1
  t5 = t4 + d5 * 10
FOR d6 = 0 TO 9
 IF used(d6) = 0 THEN
  used(d6) = 1
  t6 = t5 + d6

  t = t6
  FOR i = 1 TO 5
    t = t + t6
    flag = 1: t$ = LTRIM$(STR$(t))
    FOR j = 1 TO LEN(t$)
     d = VAL(MID$(t$, j, 1))
     IF used(d) = 0 THEN flag = 0: EXIT FOR
    NEXT
    IF flag = 0 THEN EXIT FOR
  NEXT i
  IF flag THEN PRINT t6

  used(d6) = 0
 END IF
NEXT d6
  used(d5) = 0
 END IF
NEXT d5
  used(d4) = 0
 END IF
NEXT d4
  used(d3) = 0
 END IF
NEXT d3
  used(d2) = 0
 END IF
NEXT d2
  used(d1) = 0
NEXT d1


 


  Posted by Charlie on 2005-07-04 18:47:29
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 - 2017 by Animus Pactum Consulting. All rights reserved. Privacy Information