Results 1 to 10 of 10
- 12-23-2011, 08:25 PM #1
Senior Member
- Join Date
- Nov 2011
- Location
- Turkey
- Posts
- 378
- Blog Entries
- 24
- Rep Power
- 2
- 12-23-2011, 08:39 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,606
- Blog Entries
- 7
- Rep Power
- 17
Re: How would you solve this? Java coding for multiplication.
It cannot be solved because the righrmost digit in the fourth row has to be a zero.
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 12-23-2011, 08:41 PM #3
Senior Member
- Join Date
- Nov 2011
- Location
- Turkey
- Posts
- 378
- Blog Entries
- 24
- Rep Power
- 2
Re: How would you solve this? Java coding for multiplication.
What makes you think that?
I am sure it is a "can be solved" question.
- 12-23-2011, 08:59 PM #4
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,561
- Rep Power
- 11
Re: How would you solve this? Java coding for multiplication.
- 12-23-2011, 09:02 PM #5
Senior Member
- Join Date
- Nov 2011
- Location
- Turkey
- Posts
- 378
- Blog Entries
- 24
- Rep Power
- 2
- 12-23-2011, 09:08 PM #6
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,606
- Blog Entries
- 7
- Rep Power
- 17
Re: How would you solve this? Java coding for multiplication.
The last digit of the top two numbers have to be a 3 and a 5 (...3x..5 = ....5 (or ..5x.3 = ....5 is the only possibility), so the last digit of the result is 5 as well. Maybe consistent reasoning like this can help you to solve this puzzle. If there are too many alternatives I'd take the lazy approach (brute force)
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 12-23-2011, 09:11 PM #7
Senior Member
- Join Date
- Nov 2011
- Location
- Turkey
- Posts
- 378
- Blog Entries
- 24
- Rep Power
- 2
Re: How would you solve this? Java coding for multiplication.
I am trying to solve it with Java :)
Thanks though... :)
I have this idea of looping for all numbers in the first 2 rows and multiplying them and to check if they are all prime numbers(2,3,5,7)..
But can there be a better approach ?
- 12-23-2011, 09:15 PM #8
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,561
- Rep Power
- 11
Re: How would you solve this? Java coding for multiplication.
Totally slow answer adding nothing removed.
@OP: That's more or less what I would do.Last edited by pbrockway2; 12-23-2011 at 09:17 PM.
- 12-23-2011, 09:30 PM #9
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,606
- Blog Entries
- 7
- Rep Power
- 17
Re: How would you solve this? Java coding for multiplication.
There are four different digits (2, 3, 5 and 7) so you should count in base 4. There are 4x4x4 possible first numbers and 4x4 possible second numbers. You can try them all after mapping 0 --> 2, 1 --> 3, 2 --> 5 and 3 --> 7 and see which numbers have the correct result.
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 12-23-2011, 09:34 PM #10
Senior Member
- Join Date
- Nov 2011
- Location
- Turkey
- Posts
- 378
- Blog Entries
- 24
- Rep Power
- 2
Similar Threads
-
Coding sms in java?
By strictlydivine.elite in forum Advanced JavaReplies: 2Last Post: 11-18-2010, 02:10 PM -
does gui coding in netbeans is just the same with coding without nebeans?
By maizuddin35 in forum NetBeansReplies: 4Last Post: 10-25-2010, 03:49 PM -
java coding
By zawad in forum Suggestions & FeedbackReplies: 1Last Post: 07-07-2009, 01:55 PM -
Coding Java on a Mac
By Menre in forum New To JavaReplies: 5Last Post: 05-06-2008, 05:49 AM -
Cannot solve the coding problem of my assignment
By elimmom in forum New To JavaReplies: 3Last Post: 08-13-2007, 11:33 AM


LinkBack URL
About LinkBacks
Reply With Quote


Bookmarks