- When completed, this crossnumber puzzle has exactly one digit in each box.
- None of the a,b,c or d boxes (whether down or across) can contain any leading zero.
- Both concatenations ab and cd consist of nonzero digits.
+-----+-----+
| a | b |
+-----+-----+-----+
| c | | |
+-----+-----+-----+
| d | |
+-----+-----+
ACROSS DOWN
a. Abigail's age a. Sum of three of the ages
in c "across".
c. Sum of Abigail's age,
Blanche's age, Cynthia's b. Cynthia's age.
age, and Darlene's age.
c. Darlene's age.
d. Blanche's age
Whose age was omitted in
a "down" category?
Blanche's age was omitted from a 'down'.
Computer solution (Python) found a unique solution:
count=0
missingAge = ''
for A in range(1,3):
for B in range(1,10):
for C in range(1,4):
for D in range(1,10):
for E in range(0,10):
for F in range(0,10):
for G in range(0,10):
Abigail = 10*A+B
Blanche = 10*D+G
Cynthia = 10*B+F
Darlene = 10*C+D
cAcross = Abigail+Blanche+Cynthia+Darlene
if cAcross == 100*C+10*E+F:
if 100*A+10*E+G == Abigail+Blanche+Cynthia or \
100*A+10*E+G == Abigail+Blanche+Darlene or \
100*A+10*E+G == Abigail+Cynthia+Darlene or \
100*A+10*E+G == Blanche+Cynthia+Darlene:
print(A,B,C,D,E,F,G)
print('Abigail: ', Abigail)
print('Blanche: ', Blanche)
print('Cynthia: ', Cynthia)
print('Darlene: ', Darlene)
print('The age not included in A Down is ', cAcross - (100*A+10*E+G) )
if cAcross - (100*A+10*E+G) == Abigail:
missingAge='Abigail'
elif cAcross - (100*A+10*E+G) == Blanche:
missingAge='Blanche'
elif cAcross - (100*A+10*E+G) == Cynthia:
missingAge='Cynthia'
elif cAcross - (100*A+10*E+G) == Darlene:
missingAge='Darlene'
else:
print('error')
print('The person whose age is not included in A Down is', missingAge)
count += 1
print('The program found',count, 'solution.')
----------
Results:
1 6 2 9 0 0 5
Abigail: 16
Blanche: 95
Cynthia: 60
Darlene: 29
The age not included in A Down is 95
The person whose age is not included in A Down is Blanche
The program found 1 solution.
|
Posted by Larry
on 2019-11-17 11:26:02 |