MAHATMA+GANDHI=DISSENT
Today (Oct 2) is his birthday and India’s national holiday.
Why DISSENT?
clearvars,clc
eq='mahatma+gandhi==dissent';
code0= setdiff(eq,'+-*/=');
code=cellstr(code0(:));
digsets=perms('0123456789');
for i=1:length(digsets)
digs0=digsets(i,:);
digs=cellstr(digs0(:));
plain=replace(eq,code,digs);
if eval(plain)
disp(plain)
end
end
finds the solution:
1454714 + 846253 = 2300967
|
Posted by Charlie
on 2024-10-02 08:49:53 |