7 + 7 + 6 = 20

Logic Level 4

S E V E N S E V E N + S I X T W E N T Y \begin{array} { l l l l l l } & S & E & V & E & N \\ & S & E & V & E & N \\ +& & & S & I & X \\ \hline \\ T & W & E& N&T&Y\\ \end{array}

Each letter represents a distinct digit.

What is the value of W W ?

2 5 9 4 7 8 3 6

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.

5 solutions

Discussions for this problem are now closed

Chew-Seong Cheong
Jan 27, 2015

Let c n = 0 , 1 , 2 c_n = 0,1,2 be the carried-forward. From S + S + c 4 = T W S+S+c_4= TW , it is clear that T = 1 T = 1 or 2 2 .

If T = 2 T=2 , then S = 9 S=9 , c 4 = 2 c_4=2 , E = 8 E=8 and W = 0 W=0 . From E + E + I + c 1 = 10 c 2 + T I + c 1 = 6 E+E+I+c_1=10c_2 +T \Rightarrow I+c_1 = 6 and c 2 = 2 c_2 = 2 . There are three cases for V + V + S + 2 = 20 + N V+V+S+2 = 20 +N :

  • V = 5 V=5 and N = 1 N=1 , then N + N + X = Y X = 0 = W N+N+X = Y\Rightarrow X=0=W , which in not acceptable.
  • V = 6 V=6 and N = 3 N=3 , then N + N + X = Y X = 6 = V N+N+X = Y\Rightarrow X=6=V , not acceptable.
  • V = 7 V=7 and N = 5 N=5 , then N + N + X = Y X = 2 = T N+N+X = Y\Rightarrow X=2=T , not acceptable.

Therefore, T = 1 \boxed{T=1} .

Now, from E + E + I + c 1 = 10 c 2 + T = 1 , 11 , 21 E+E+I+c_1 = 10c_2 + T = 1,11,21 .

  • If c 2 = 0 c_2 = 0 , the only option is E = 0 E=0 and I = 1 = T I = 1 = T which is not acceptable.
  • If c 2 = 1 c_2 = 1 , there are two options:
  • E = 5 \quad \Rightarrow E=5 and I = 1 = T I=1=T , not acceptable;
  • E = 4 \quad \Rightarrow E=4 and I + c 1 = 3 I + c_1 = 3 , but then it is impossible to have E + E + c 3 = 10 c 4 + E \quad \quad \space E+E+c_3 = 10c_4 + E
  • Therefore, c 2 = 2 c_2 = 2 and there are two options:
  • E = 7 \quad \Rightarrow E=7 , I = 6 I =6 and c 1 = 1 c_1=1 , again it is impossible to have E + E + c 3 = 10 c 4 + E \quad \quad \space E+E+c_3 = 10c_4 + E
  • \quad \Rightarrow the right option is E = 8 \boxed{E=8} , I + c 1 = 5 I + c_1 =5 , c 3 = 2 c_3 =2 and c 4 = 1 c_4 = 1

From V + V + S + 2 = 20 + N V+V+S+2=20+N , we have three options:

  • V = 9 V=9 , then S = N S=N , not acceptable.
  • V = 6 V=6 , S = 7 S=7 and N = 1 = T N=1=T , not acceptable.
  • Therefore, V = 7 \boxed{V=7} , S = 6 \boxed{S=6} and N = 2 \boxed{N=2} .

From S + S + c 4 = T W 6 + 6 + 1 = 13 W = 3 S+S+c_4= TW \quad \Rightarrow 6+6+1 = 13 \Rightarrow \boxed{W=3}

I actually solved it with coding using Python before I provide the solution above. My coding is as follows:

 # 7+7+6=20

 from itertools import permutations

 for a in permutations("0123456789", 9):
     S =  a[0]
     E =  a[1]
     V =  a[2]
     N =  a[3]
     I =  a[4]
     X =  a[5]
     T =  a[6]
     W =  a[7]
     Y =  a[8]
     if S != "0" and T != "0":
         if 2*int(S+E+V+E+N) + int(S+I+X) == int(T+W+E+N+T+Y):
             print S+E+V+E+N, S+I+X, T+W+E+N+T+Y

Chew-Seong Cheong - 6 years, 4 months ago
Shadi Barghash
Jan 30, 2015

I first tried to solve it by hand, then I decided to write a code to do it for me.. and it did! :D It iterates every letter for all possible digits while also making sure it's not assigned to different letter. Here it is:

Dim T As Byte = 0
    Dim W As Byte = 0
    Dim Y As Byte = 0

    For N As Byte = 0 To 9 Step 1
        For X As Byte = 0 To 9 Step 1

            If X <> N Then

                For E As Byte = 0 To 9 Step 1

                    If E <> N And E <> X Then

                        For I As Byte = 0 To 9

                            If I <> N And I <> X And I <> E Then

                                For V As Byte = 0 To 9 Step 1

                                    If V <> I And V <> E And V <> X And V <> N Then

                                        For S As Byte = 0 To 9 Step 1

                                            If S <> V And S <> I And S <> E And S <> X And S <> N Then

                                                Dim SEVEN As String = String.Format("{0}{1}{2}{3}{4}", S, E, V, E, N)
                                                Dim SIX As String = String.Format("{0}{1}{2}", S, I, X)

                                                Dim theSum As Integer = (CInt(SEVEN) * 2) + CInt(SIX)

                                                Dim sumChars() As Char = theSum.ToString().ToCharArray()

                                                If sumChars.Length = 6 Then

                                                    T = CByte(Val(sumChars(0)))
                                                    W = CByte(Val(sumChars(1)))
                                                    Y = CByte(Val(sumChars(5)))

                                                    If CByte(Val(sumChars(4))) = T And T <> S And T <> E And T <> V And T <> N And T <> I And T <> X And T <> W And T <> Y Then

                                                        If CByte(Val(sumChars(2))) = E And E <> W And E <> Y Then

                                                            If CByte(Val(sumChars(3))) = N And N <> W And N <> Y Then

                                                                If W <> S And W <> V And W <> I And W <> X And W <> Y Then

                                                                    If Y <> S And Y <> V And Y <> I And Y <> X Then

                                                                        Console.WriteLine(SEVEN)
                                                                        Console.WriteLine(SEVEN)

                                                                        Console.WriteLine(SIX)

                                                                        Console.WriteLine("=====")

                                                                        Console.WriteLine("{0}{1}{2}{3}{4}{5}", T, W, E, N, T, Y)

                                                                        Console.WriteLine()

                                                                    End If

                                                                End If

                                                            End If

                                                        End If

                                                    End If

                                                End If

                                            End If

                                        Next

                                    End If

                                Next

                            End If

                        Next

                    End If

                Next

            End If

        Next
    Next

    Console.ReadLine()

that was amazing

Caio Espínola - 6 years, 4 months ago
Rajat De
Jan 30, 2015

include<bits/stdc++.h>

using namespace std;

define f(i,n) for(int i=0;i<=9;i++){

int main(){

f(s,10)

    f(e,s)

        f(v,e)

            f(n,v)

                f(i,n)

                    f(x,i)

                        f(y,x)

                            f(t,y)

                                f(w,t)


        if(((s*10000+ e * 1000 + v * 100 + e * 10 + n)*2 + s*100 + i*10 + x)==t*100000 + w*10000 + e*1000 + n*100 + t*10 + y&&s!=e&&s!=v&&s!=n&&s!=i&&s!=x&&s!=t&&s!=w&&s!=y&&e!=v&&e!=n&&e!=i&&e!=x&&e!=t&&e!=w&&e!=y&&v!=n&&v!=i&&v!=x&&v!=t&&v!=w&&v!=y&&n!=i&&n!=x&&n!=t&&n!=y&&n!=w&&i!=x&&i!=t&&i!=y&&i!=w&&x!=t&&x!=w&&x!=y&&t!=w&&t!=y&&w!=y)cout<<w<<" ";



                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

}

Lu Chee Ket
Jan 29, 2015

Most efficient permutation by random generator gives answer for W as 3

68782

68782

650

138214

S = 6

E = 8

V = 7

N = 2

I = 5

X = 0

T = 1

W = 3

Y = 4

With maximum of about 10 million or less than 0.5 million of trials, the answer must be found. An only answer was every time and it should be sole answer.

Can you add your code of how you used a random generator? This way, others can learn from it.

Note that a solution set need not be unique, and that we are also not guaranteed that a solution set exists.

Calvin Lin Staff - 6 years, 4 months ago

Permutation is quite a tedious task that I have done it before for other question found else where which I called a runner. Random can make easy task with the speed and power to consider all for limited space with effective spans. Since you may like permutation as a better solution, I think I just keep my method for own use. The main idea is to set a list of arrays in order and then swap each and everyone by doing a one to one interchange. Having proper equations to add up what we want, when the computer got it, it ceases to acknowledge.

Lu Chee Ket - 6 years, 4 months ago

I thought of randomising them until they're correct, but I then decided an ordered iteration will get it faster, with a maximum of only 1 million iterations.

Shadi Barghash - 6 years, 4 months ago

On average, because a randomized algorithm could result in duplicate searches, it will be slower.

It ultimately depends on how what the solution set looks like. In this case, we don't really have much of a clue without doing any further analysis.

Calvin Lin Staff - 6 years, 4 months ago

That what I thought of :)

Shadi Barghash - 6 years, 4 months ago
Lie Piran
Jan 26, 2015

Seven + seven + six=twenty Then 68782+68782+650=138214 So, w=3

How did you reach that conclusion?

Calvin Lin Staff - 6 years, 4 months ago

IF A=1 ,B=2...Z=26 Then SEVEN=19 5 22 5 14 ,So FOR S=19+5=24=2+4=6,E=19+5+2=26=2+6,V=19+5+2+2=28=2+8=10=1+0=1,
E=19+5+2+2+5=33=3+3=6,N=19+5+2+2+5+14=47=4+7=11=1+1=2,

So SEVEN=68162,
Similarly=SIX=19 9 24,WHERE S=1+9=1,I=19+9=28=2+8=10=1+0=1,X=19+9+24=52=5+2=7,For this SIX=117

So 68162+68162+117=136441=TWENTY .So W=3

GOUTAM TRIPATHY - 6 years, 4 months ago

According to you SEVEN = 68162 but shouldn't the second and second last digit (8 and 6 in you r solution) be same?

Ritvik agg - 6 years, 4 months ago

I'm sorry, but I do not understand what you are trying to say. How did you go from "SIX = 19 9 25" to "where S=1+9=1, I=19+9=28=2+8=10=1+0=1, X=19+9+24=52=5+2=7"?

And if "SIX = 117", and "SEVEN = 68162", is the value of S equal to 1 or 6?

Calvin Lin Staff - 6 years, 4 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...