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

Home > Numbers
3x3 Grid Alphamagic (Posted on 2009-09-17) Difficulty: 3 of 5
Substitute each of the capital letters by a different digit from 0 to 9, such that each of the columns, each of the rows and each of the two main diagonals of this 3x3 grid have the common sum LRK. It is known that L is nonzero and, none of the numbers in the nine cells contains a leading zero.

CL    RO    OR
EK    HS    AA
KE    KB    SH

Note: LRK is equal to 100*L + 10*R + K.

See The Solution Submitted by K Sengupta    
Rating: 3.0000 (1 votes)

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

31  76  67
94  58  22
49  40  85

CLS

b = 0

FOR c = 1 TO 9
 IF used(c) = 0 THEN
  used(c) = 1
FOR r = 1 TO 9
 IF used(r) = 0 THEN
  used(r) = 1
FOR o = 1 TO 9
 IF used(o) = 0 THEN
  used(o) = 1
  ro = 10 * r + o
  vor = 10 * o + r
FOR e = 1 TO 9
 IF used(e) = 0 THEN
  used(e) = 1
FOR h = 1 TO 9
 IF used(h) = 0 THEN
  used(h) = 1
FOR a = 1 TO 9
 IF used(a) = 0 THEN
  used(a) = 1
  aa = 10 * a + a
FOR k = 1 TO 9
 IF used(k) = 0 THEN
  used(k) = 1
  ek = 10 * e + k
  ke = 10 * k + e
  kb = 10 * k + b
FOR s = 1 TO 9
 IF used(s) = 0 THEN
  used(s) = 1
  hs = 10 * h + s
  sh = 10 * s + h
FOR l = 1 TO 9
 IF used(l) = 0 THEN
  used(l) = 1

  cl = 10 * c + l
  lrk = 100 * l + 10 * r + k
  IF cl + ro + vor = lrk THEN
  IF ek + hs + aa = lrk THEN
  IF ke + kb + sh = lrk THEN
  IF cl + ek + ke = lrk THEN
  IF ro + hs + kb = lrk THEN
  IF sh + aa + vor = lrk THEN
  IF ke + hs + vor = lrk THEN
  IF cl + hs + sh = lrk THEN

  PRINT cl; ro; vor
  PRINT ek; hs; aa
  PRINT ke; kb; sh

  END IF
  END IF
  END IF
  END IF
  END IF
  END IF
  END IF
  END IF

  used(l) = 0
 END IF
NEXT
  used(s) = 0
 END IF
NEXT
  used(k) = 0
 END IF
NEXT
  used(a) = 0
 END IF
NEXT
  used(h) = 0
 END IF
NEXT
  used(e) = 0
 END IF
NEXT
  used(o) = 0
 END IF
NEXT
  used(r) = 0
 END IF
NEXT
  used(c) = 0
 END IF
NEXT

 


  Posted by Charlie on 2009-09-17 13:55:21
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 (9)
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