Twisted Addition Cryptogram!

T E N T E N N I N E E I G H T + T H R E E F O R T Y \large{\begin{array}{ccccccc} && & & & T & E&N\\ && & & & T & E&N\\ && & & N & I &N&E \\ && & E&I &G &H&T\\ + && & T&H &R & E&E \\ \hline & & &F & O&R & T&Y\\ \hline \end{array}}


How many solutions exists to the given addition problem, where each letter represents a distinct digit?

Note: The first digit of a number can be zero. For example (not necessarily true), in the number N I N E \overline{NINE} , we can have it as 0 I 0 E \overline{0I0E} .

2 10 8 5 12 6 0 4

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.

3 solutions

Satyajit Mohanty
Aug 7, 2015

There are 10 solutions:

417 + 417 + 7871 + 18324 + 42511 = 69540 417 + 417 + 7871 + 18324 + 42511 = 69540

701 + 701 + 1410 + 04267 + 76500 = 83579 701 + 701 + 1410 + 04267 + 76500 = 83579

047 + 047 + 7174 + 41690 + 09344 = 58302 047 + 047 + 7174 + 41690 + 09344 = 58302

718 + 718 + 8281 + 12347 + 74011 = 96075 718 + 718 + 8281 + 12347 + 74011 = 96075

148 + 148 + 8284 + 42391 + 19644 = 70615 148 + 148 + 8284 + 42391 + 19644 = 70615

713 + 713 + 3431 + 14207 + 70611 = 89675 713 + 713 + 3431 + 14207 + 70611 = 89675

631 + 631 + 1013 + 30756 + 65233 = 98264 631 + 631 + 1013 + 30756 + 65233 = 98264

329 + 329 + 9492 + 24863 + 36022 = 71035 329 + 329 + 9492 + 24863 + 36022 = 71035

624 + 624 + 4042 + 20756 + 65322 = 91368 624 + 624 + 4042 + 20756 + 65322 = 91368

308 + 308 + 8780 + 07643 + 34200 = 51239 308 + 308 + 8780 + 07643 + 34200 = 51239

Moderator note:

How can we show that there are only 10 solutions?

You made a list of some solutions for the problem, but you have to prove that there are only 10 solutions.

Paulo Guilherme Santos - 5 years, 10 months ago

I have written the shortest and the most concise code I can get for solving this problem:

1
2
3
4
5
l=0
for t,e,n,i,g,h,r,f,o,y in permutations('0123456789',10):
  if 2*int(t+e+n)+int(n+i+n+e)+int(e+i+g+h+t)+int(t+h+r+e+e)==int(f+o+r+t+y):
    l+=1
print(l)

1
2
Output:
10

Soumava Pal
Mar 19, 2016
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
for t in range(10):
    for e in range(10):
        if e!=t:
            for n in range(10):
                if n not in [e,t]:
                    for i in range(10):
                        if i not in [t,e,n]:
                            for g in range(10):
                                if g not in [t,e,n,i]:
                                    for h in range(10):
                                        if h not in [t,e,n,i,g]:
                                            for r in range(10):
                                                if r not in [t,e,n,i,g,h]:
                                                    for f in range(10):
                                                        if f not in [t,e,n,i,g,h,r]:
                                                            for o in range(10):
                                                                if o not in [t,e,n,i,g,h,r,f]:
                                                                    for y in range(10):
                                                                        if y not in [t,e,n,i,g,h,r,f,o]:
                                                                            if (200*t+20*e+2*n+1000*n+100*i+10*n+e+10000*e+1000*i+100*g+10*h+t+10000*t+1000*h+100*r+10*e+e)==(10000*f+1000*o+100*r+10*t+y):
                                                                                print t,e,n,i,g,h,r,f,o,y

0 4 7 1 6 9 3 5 8 2
1 4 8 2 3 9 6 7 0 5
3 0 8 7 6 4 2 5 1 9
3 2 9 4 8 6 0 7 1 5
4 1 7 8 3 2 5 6 9 0
6 2 4 0 7 5 3 9 1 8
6 3 1 0 7 5 2 9 8 4
7 0 1 4 2 6 5 8 3 9
7 1 3 4 2 0 6 8 9 5
7 1 8 2 3 4 0 9 6 5
>>> 

This is pretty good and straightforward but we can use permutations from itertools to shorten it up a LiTtLe BiT lol:

1
2
3
4
5
l=0
for t,e,n,i,g,h,r,f,o,y in permutations('0123456789',10):
  if 2*int(t+e+n)+int(n+i+n+e)+int(e+i+g+h+t)+int(t+h+r+e+e)==int(f+o+r+t+y):
    l+=1
print(l)

1
2
Output:
10

Anonymous1 Assassin - 4 months, 3 weeks ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...