Solve each of these separate cryptarithms:
- THREE/NINTHS = 3/9
- TWELVE/NINTHS = 12/9
- ONE/HALF = 1/2 (such that TWO+ONE+THREE = 32,213)
three ninths
53844 161532
twelve ninths
632812 474609
one half one two three
728 1456 728 397 31088
Without the "such that", the following would be solutions for ONE/HALF = 1/2:
652 1304 852 1704 853 1706 654 1308 356 712
456 912 358 716 458 916 359 718 413 826
314 628 164 328 364 728 764 1528 865 1730
416 832 267 534 218 436 219 438 269 538
769 1538 523 1046 923 1846 273 546 176 352
476 952 327 654 827 1654 927 1854 728 1456
178 356 478 956 329 658 729 1458 179 358
679 1358 431 862 381 762 481 962 532 1064
932 1864 182 364 382 764 782 1564 134 268
534 1068 635 1270 835 1670 935 1870 685 1370
436 872 536 1072 936 1872 186 372 486 972
138 276 238 476 538 1076 139 278 239 478
539 1078 639 1278 341 682 391 782 192 384
392 784 692 1384 792 1584 143 286 543 1086
293 586 793 1586 645 1290 845 1690 546 1092
148 296 548 1096
The cases of half showing as only three digits are instances where H is a leading zero.
CLS
FOR t = 0 TO 9
used(t) = 1
FOR h = 0 TO 9
IF used(h) = 0 THEN
used(h) = 1
FOR r = 0 TO 9
IF used(r) = 0 THEN
used(r) = 1
FOR e = 0 TO 9
IF used(e) = 0 THEN
used(e) = 1
FOR n = 0 TO 9
IF used(n) = 0 THEN
used(n) = 1
FOR i = 0 TO 9
IF used(i) = 0 THEN
used(i) = 1
FOR s = 0 TO 9
IF used(s) = 0 THEN
used(s) = 1
three = t * 10000 + h * 1000 + r * 100 + e * 11
ninths = n * 101000 + i * 10000 + t * 100 + h * 10 + s
IF 9 * three / ninths = 3 THEN
PRINT three; ninths
REM
END IF
used(s) = 0
END IF
NEXT
used(i) = 0
END IF
NEXT
used(n) = 0
END IF
NEXT
used(e) = 0
END IF
NEXT
used(r) = 0
END IF
NEXT
used(h) = 0
END IF
NEXT
used(t) = 0
NEXT
FOR t = 0 TO 9
used(t) = 1
FOR w = 0 TO 9
IF used(w) = 0 THEN
used(w) = 1
FOR l = 0 TO 9
IF used(l) = 0 THEN
used(l) = 1
FOR e = 0 TO 9
IF used(e) = 0 THEN
used(e) = 1
FOR n = 0 TO 9
IF used(n) = 0 THEN
used(n) = 1
FOR i = 0 TO 9
IF used(i) = 0 THEN
used(i) = 1
FOR s = 0 TO 9
IF used(s) = 0 THEN
used(s) = 1
FOR v = 0 TO 9
IF used(v) = 0 THEN
used(v) = 1
FOR h = 0 TO 9
IF used(h) = 0 THEN
used(h) = 1
twelve = t * 100000 + w * 10000 + e * 1001 + l * 100 + v * 10
ninths = n * 101000 + i * 10000 + t * 100 + h * 10 + s
IF 9 * twelve / ninths = 12 THEN
PRINT twelve; ninths
END IF
used(h) = 0
END IF
NEXT
used(v) = 0
END IF
NEXT
used(s) = 0
END IF
NEXT
used(i) = 0
END IF
NEXT
used(n) = 0
END IF
NEXT
used(e) = 0
END IF
NEXT
used(l) = 0
END IF
NEXT
used(w) = 0
END IF
NEXT
used(t) = 0
NEXT
FOR t = 0 TO 9
used(t) = 1
FOR w = 0 TO 9
IF used(w) = 0 THEN
used(w) = 1
FOR l = 0 TO 9
IF used(l) = 0 THEN
used(l) = 1
FOR e = 0 TO 9
IF used(e) = 0 THEN
used(e) = 1
FOR n = 0 TO 9
IF used(n) = 0 THEN
used(n) = 1
FOR o = 0 TO 9
IF used(o) = 0 THEN
used(o) = 1
FOR f = 0 TO 9
IF used(f) = 0 THEN
used(f) = 1
FOR a = 0 TO 9
IF used(a) = 0 THEN
used(a) = 1
FOR h = 0 TO 9
IF used(h) = 0 THEN
used(h) = 1
FOR r = 0 TO 9
IF used(r) = 0 THEN
used(r) = 1
one = o * 100 + n * 10 + e
half = h * 1000 + a * 100 + l * 10 + f
two = t * 100 + w * 10 + o
three = t * 10000 + h * 1000 + r * 100 + e * 11
IF 2 * one / half = 1 THEN
IF one + two + three = 32213 THEN
PRINT one; half, one; two; three
END IF
END IF
used(r) = 0
END IF
NEXT
used(h) = 0
END IF
NEXT
used(a) = 0
END IF
NEXT
used(f) = 0
END IF
NEXT
used(o) = 0
END IF
NEXT
used(n) = 0
END IF
NEXT
used(e) = 0
END IF
NEXT
used(l) = 0
END IF
NEXT
used(w) = 0
END IF
NEXT
used(t) = 0
NEXT
FOR l = 0 TO 9
IF used(l) = 0 THEN
used(l) = 1
FOR e = 0 TO 9
IF used(e) = 0 THEN
used(e) = 1
FOR n = 0 TO 9
IF used(n) = 0 THEN
used(n) = 1
FOR o = 0 TO 9
IF used(o) = 0 THEN
used(o) = 1
FOR f = 0 TO 9
IF used(f) = 0 THEN
used(f) = 1
FOR a = 0 TO 9
IF used(a) = 0 THEN
used(a) = 1
FOR h = 0 TO 9
IF used(h) = 0 THEN
used(h) = 1
one = o * 100 + n * 10 + e
half = h * 1000 + a * 100 + l * 10 + f
IF 2 * one / half = 1 THEN
PRINT one; half,
END IF
used(h) = 0
END IF
NEXT
used(a) = 0
END IF
NEXT
used(f) = 0
END IF
NEXT
used(o) = 0
END IF
NEXT
used(n) = 0
END IF
NEXT
used(e) = 0
END IF
NEXT
used(l) = 0
END IF
NEXT
|
Posted by Charlie
on 2009-06-30 12:59:33 |