A cryptogram (part 2)

Computer Science Level pending

A B × C D E F G H I J \begin{array} { l l l l l } & & & A & B \\ \times & & C & D & E \\ \hline F & G & H & I & J \\ \hline \\ \end{array}

In the above cryptogram, all the letters represent distinct digits from 0 to 9.

What is the minimum possible value of the 5-digit number F G H I J \overline{FGHIJ} ?

Note that A , C , F 0 A, C, F \neq 0 .


The answer is 15678.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Hasmik Garyaka
Oct 22, 2017
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
def crypto():
    result=[]
    maxprod=100000
    for p in list(permutations(range(10))):
        if p[0]==0 or p[2]==0 or p[5]==0: continue
        ab=10*p[0]+p[1]
        cde=100*p[2]+10*p[3]+p[4]
        f=10000*p[5]+1000*p[6]+100*p[7]+10*p[8]+p[9]
        product=ab*cde
        if product>=100000 or product<10000:
            continue
        if product==f:
            if product<maxprod:
                result.append(p)
                print (product)
                maxprod=product
    print(result)

Chan Lye Lee
May 15, 2017

It is a partial solution:

The following shows that F G H I J = 15678 \overline{FGHIJ} =15678 is possible. 3 9 × 4 0 2 1 5 6 7 8 \begin{array} { l l l l l } & & & 3 & 9 \\ \times & & 4 & 0 & 2 \\ \hline 1 & 5 & 6 & 7 & 8 \\ \hline \\ \end{array}

How did you solve this? Did you use computer assistance?

Pi Han Goh - 4 years ago

Log in to reply

Yes, by Excel.

Chan Lye Lee - 4 years ago

Log in to reply

Excel? I don't see how that's doable. Can you explain more in detail?

Like what do you write in the cells to "do all the trials"?

Pi Han Goh - 4 years ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...