All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Find the Key (Posted on 2024-10-20) Difficulty: 3 of 5
MAI is the square of ST.
And:
                               
            . . . . . A 
                  M A I 
          --------------
          . . . . . . .
        . . . . . . .
      . . E N . . . 
     -------------------
      P R I N T E M P S 

No Solution Yet Submitted by K Sengupta    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution solution | Comment 1 of 3
clearvars
for st=12:sqrt(1000)
  stStr=num2str(st);
  if length(unique(stStr))==2
    maiV=st^2; mai=num2str(maiV); 
    if length(unique(mai))==3
      m=mai(1); a=mai(2); i=mai(3);
      mV=str2double(m);
      aV=str2double(a);
      iV=str2double(i);
      for begin=10000:999999
        m1=str2double([num2str(begin) a]);
        p1=num2str(m1*iV);
        if length(p1)==7
           p2=num2str(m1*aV);
           if length(p2)==7
              p3=num2str(m1*mV);
              if length(p3)==7
                en=p3(3:4);
                if length(unique([en mai]))==5
                  pr=num2str(maiV*m1);
                  if p3(4)==pr(4) && p3(3)==pr(6)
                    if ~ismember(a,pr) && pr(1)==pr(8)
                  if length(pr)==9 && length(unique([pr a]))==9
                    disp([m1 maiV maiV*m1])
                  end
                    end
                  end
                end
              end
           end
        end
      end
    end
  end
end
    
>> findTheKey
          multiplicands     product
      341737         576   196840512
      794302         729   579046158
      
The second "solution" is spurious, as the third from the last digit of the product does not match the first digit of the second multiplicand, something the program didn't check for.

Reconstructing the multiplication:

      
>> m1=341737
m1 =
      341737
 
>> m1*6
ans =
     2050422
>> m1*7
ans =
     2392159
>> m1*5
ans =
     1708685
>>     

Arranging:

      341737
         576
   ---------         
     2050422
    2392159
   1708685 
   ---------   
   196840512

  Posted by Charlie on 2024-10-21 10:47:51
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (5)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information