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

 USA = n*UK (Posted on 2013-01-21)
Each of the letters in bold represents a base ten digit from 0 to 9 to satisfy these alphametic relationships. None of the numbers can contain any leading zero.
```               USA is a multiple of UK, and:
SA is a multiple of K```
Determine the respective minimum and maximum values that USA can assume.

 No Solution Yet Submitted by K Sengupta No Rating

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

DEFDBL A-Z
CLS
FOR u = 1 TO 9
used(u) = 1
FOR k = 0 TO 9
IF used(k) = 0 THEN
used(k) = 1
FOR s = 1 TO 9
IF used(s) = 0 THEN
used(s) = 1
FOR a = 0 TO 9
IF used(a) = 0 THEN
used(a) = 1
uk = 10 * u + k
usa = 100 * u + 10 * s + a
sa = 10 * s + a
IF INT(usa / uk) = usa / uk THEN
IF INT(sa / k) = sa / k THEN PRINT usa, uk, sa
END IF
used(a) = 0
END IF
NEXT
used(s) = 0
END IF
NEXT
used(k) = 0
END IF
NEXT
used(u) = 0
NEXT

produces results that I had to sort separately, as I neglected to cycle through the variables in U, S, A order.  The sorted output, with heading added is:

`USA           UK            SA120           15            20156           12            56168           12            68168           14            68169           13            69180           12            80180           15            80196           14            96216           24            16273           21            73294           21            94324           36            24372           31            72384           32            84432           48            32492           41            92`

so USA can be as small as 120 and as large as 492.

 Posted by Charlie on 2013-01-21 12:12:29

 Search: Search body:
Forums (0)