If
FINANCING is
SEVEN^K
and
AFGVKGA=FIVE^K then what was Ady doing by posting this question?
Answer: 912084
What is the answer?
Just solving the first alphametic:
FINANCING is SEVEN^K
A 5-digit number raised to an integer power yields a 9 digit number: K must be 2
Further, SEVEN must be between 10000 and 31622.
The following program simply rules out possible values based on the patterns of the letters.
For example the 2nd and 4th digit of SEVEN are the same, and
the 2nd and 7th digit of FINANCING are the same.
FINANCING is SEVEN^ K
308986084 = 17578 ^ 2
--------------------
for i in range(10000, 31623):
s = str(i)
if s[4] == s[3]:
continue
if s[1] != s[3]:
continue
a = str(i*i)
if a[1] != a[6]:
continue
if a[2] != a[4]:
continue
if a[2] != a[7]:
continue
if s[4] != a[2]:
continue
print(i*i, '=', i,'^ 2')
|
Posted by Larry
on 2023-08-26 08:52:31 |