The Four Elements

W A T E R E A R T H F I R E + A I R N A T U R E \begin{array} { l l l l l l } & & W & A & T & E & R \\ & & E & A & R & T & H \\ & & & F & I & R & E \\ + & & & & A & I & R \\ \hline & N & A & T & U & R & E \\ \end{array}

In the above expression, each letter stands for a single unique digit. Calculate W F A T E N R H U I \overline{WFATENRHUI} .

Details and Assumptions

  • None of the word starts with 0 0 .


The answer is 9873614250.

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

Rushikesh Jogdand
Jun 25, 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
from random import shuffle
l=list(set(list('WATEREARTHFIREAIRNATURE'))) #List of characters
d=dict() # Link between digits and characters
d['N']=1 #If 'N' is not 0, it must be 1
n=[2,3,4,5,6,7,8,9,0] #digits
# Link Table of values to List of characters via 'd'
def assign():
    c=0
    for i in l:
        if not i=='N':
            d[i]=n[c]
            c+=1
#Translate words to numbers
def inte(st):
    rst=''
    ls=list(st)
    for i in ls:
        rst+=str(d[i])
    return int(rst)
# ... and finally
while True:
    shuffle(n)
    assign()
    for t in list('WEFA'): # these mustn't be 0
        if d[t]==0:
            continue
    lhsl=['WATER','EARTH','FIRE','AIR'] #lhsl = Left Hand Side List
    lhss=0 #Left Hand Side sum
    for t in lhsl:
        lhss+=inte(t)
    if lhss==inte('NATURE'):
        print(inte('WFATENRHUI'))
        break

Pranjal Jain
May 9, 2015
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
from itertools import permutations
for i in permutations('0123456789'):
    x=''.join(i)
    W=x[0]
    A=x[1]
    T=x[2]
    E=x[3]
    R=x[4]
    H=x[5]
    F=x[6]
    I=x[7]
    N=x[8]
    U=x[9]
    if int(W+A+T+E+R)+int(E+A+R+T+H)+int(F+I+R+E)+int(A+I+R)==int(N+A+T+U+R+E):
        print(W+F+A+T+E+N+R+H+U+I)
#Returns 2379401856, 9873614250

There can be some math observations like N=1,H must be EVEN and that max{W,E}>=6. But they don't go furthur i guess.

Chandrachur Banerjee - 5 years, 11 months ago

Log in to reply

Perhaps. I didn't tried.

Pranjal Jain - 5 years, 11 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...