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

Home > Just Math
Restoring a multiplication sample (Posted on 2018-12-27) Difficulty: 5 of 5
Consider:
   000
  *001
______
  0010
 0010
0000
______
100000
Replace 1 by a certain non-zero digit - the remaining zeroes by other digits, so that the multiplication sample is correctly resolved.

No Solution Yet Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solutions Comment 1 of 1
   677
   473
------   
  2031
 4739
2708
------   
320221

   679
   483
------   
  2037
 5432
2716
------   
327957

   735
   574
------   
  2940
 5145
3675
------   
421890

   868
   847
------   
  6076
 3472
6944
------   
735196


 For a = 100 To 999
  astr$ = LTrim(Str(a))
 For b = 101 To 999
  DoEvents
   pr$ = LTrim(RTrim(a * b))
   bs$ = LTrim(Str(b))
   br$ = Right(bs, 1)
   d1 = Val(Mid(bs, 1, 1))
   d2 = Val(Mid(bs, 2, 1))
   d3 = Val(Mid(bs, 3, 1))
   l1$ = LTrim(Str(d3 * a))
   l2$ = LTrim(Str(d2 * a))
   l3$ = LTrim(Str(d1 * a))
   If br > "0" Then
     If Len(l1) = 4 And Len(l2) = 4 And Len(l3) = 4 And Len(pr) = 6 Then
       If Mid(l1, 3, 1) = br And Mid(l2, 3, 1) = br Then
         If InStr(l3, br) = 0 And InStr(astr, br) = 0 And InStr(bs, br) = 3 Then
           If InStr(l1, br) = 3 And InStr(l2, br) = 3 Then
             If Right(l1, 1) <> br And Right(l2, 1) <> br Then
               If Left(pr, 1) = br And InStr(Mid(pr, 2), br) = 0 Then
                Text1.Text = Text1.Text & a & crlf
                Text1.Text = Text1.Text & b & crlf
                Text1.Text = Text1.Text & l1 & crlf
                Text1.Text = Text1.Text & l2 & crlf
                Text1.Text = Text1.Text & l3 & crlf
                Text1.Text = Text1.Text & a * b & crlf & crlf
               End If
             End If
           End If
         End If
       End If
     End If
   End If
 
 Next
 Next


  Posted by Charlie on 2018-12-27 11:12:58
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 (0)
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