![]() |
|
![]() |
| LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| Super Moderator Join Date: Feb 2006
Posts: 2,379
Blog Entries: 4 Thanks: 118
Thanked 319 Times in 238 Posts
Rep Power: 60 | Puzzle asked in Oracle : What is the number? There are 5 digits (XXXXX) in a number and each digit of the number has a specific meaning. 1 st digit -> represents number of 0's in the number 2 nd digit -> represents number of 1's in the number 3 rd digit -> represents number of 2's in the number 4 th digit -> represents number of 3's in the number 5 th digit -> represents number of 4's in the number What is the number? Also explain your approach to solution if there is any logical approach. Thanks, Krishna
__________________ Looking for trainees for a start up company |
| | |
| | #2 (permalink) |
| Member Join Date: Jun 2007 Location: kochi, kerala, india Age: 29
Posts: 31
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 3 | Re: Puzzle asked in Oracle : What is the number? 21200 Am I Right |
| | |
| | #3 (permalink) |
| Super Moderator Join Date: Feb 2006
Posts: 2,379
Blog Entries: 4 Thanks: 118
Thanked 319 Times in 238 Posts
Rep Power: 60 | Re: Puzzle asked in Oracle : What is the number? You are correct romeovictor. It is the only possible number. Is there any logical approach for this? If you can explain how you scoped the number of possibilities to 1 would be of very useful to us. Thanks, Krishna
__________________ Looking for trainees for a start up company |
| | |
| | #4 (permalink) |
| Super Moderator Join Date: Feb 2006
Posts: 2,379
Blog Entries: 4 Thanks: 118
Thanked 319 Times in 238 Posts
Rep Power: 60 | Re: Puzzle asked in Oracle : What is the number? Here is the java program which does the same.... /* **************************************************** */ /* here is the puzzle for which the code finds solution.*/ /* */ /* There are 5 digits (XXXXX) in a number and each digit*/ /* of the number has a specific meaning. */ /* */ /* 1 st digit -> represents number of 0's in the number */ /* 2 nd digit -> represents number of 1's in the number */ /* 3 rd digit -> represents number of 2's in the number */ /* 4 th digit -> represents number of 3's in the number */ /* 5 th digit -> represents number of 4's in the number */ /* */ /* What is the number? */ /* **************************************************** */ public class puzzle { static int a[]=new int[5]; static int getNumberCount(int searchnumber) { int count=0; for(int i=0;i<5;i++) { if(a[i]==searchnumber) count++; } return count; } public static void main(String args[]) { for(a[0]=1;a[0]<=4;a[0]++) for(a[1]=0;a[1]<=4;a[1]++) for(a[2]=0;a[2]<=4;a[2]++) for(a[3]=0;a[3]<=4;a[3]++) for(a[4]=0;a[4]<=4;a[4]++) { if(a[0]==getNumberCount(0) && a[1]==getNumberCount(1) &&a[2]==getNumberCount(2) &&a[3]==getNumberCount(3) &&a[4]==getNumberCount(4)) System.out.println("Number : "+a[0]+a[1]+a[2]+a[3]+a[4]); } } }
__________________ Looking for trainees for a start up company |
| | |
| The Following 2 Users Say Thank You to sk_kireeti For This Useful Post: | ExamsExpert (19-05-09),
prac87 (26-07-09)
|
| | #5 (permalink) |
| Member Join Date: Jun 2007 Location: kochi, kerala, india Age: 29
Posts: 31
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 3 | Re: Puzzle asked in Oracle : What is the number? the only possible logical solution is elimination. i started with the first number and eliminated all other numbers except 1 & 2 if i give 1 then the second number will be 2 or 3 and the third number will be either 2 or 3 then it wont be possible to solve the equation thei i put 2 in the first place and in the third place i had only one place left and that could be only the first place and the number could be only 1. thats all RV Last edited by romeovictor04; 20-08-07 at 09:44 PM.. |
| | |
| | #6 (permalink) |
| deepu Join Date: Jan 2008
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 2 | ![]() ![]() HEY I TOO GOT IT..IT IS 21200..THANQ 4 NICE PUZZLE![]() |
| | |
| | #7 (permalink) |
| Junior Member Join Date: Feb 2008 Age: 25
Posts: 8
Thanks: 3
Thanked 1 Time in 1 Post
Rep Power: 2 | 21200 31000 40000 are the possible solution (there might be few more ).Logic is just arrangement and 0 plays great deal of role in it . |
| | |
| | #8 (permalink) |
| Unregistered
Posts: n/a
| |
|
| | #9 (permalink) | |
| Junior Member Join Date: Apr 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 2 | Re: Puzzle asked in Oracle : What is the number? Quote:
In "31000" u used number 3, then u should specify the number of 3's in the 4th digit. Similarly in "40000" u used 4 in the first digit but should specify number of 4's in the 5th digit. | |
| | |
| | #10 (permalink) |
| Junior Member Join Date: Apr 2008 Age: 26
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 2 | Re: Puzzle asked in Oracle : What is the number? Hi Kireeti. Could you please explain me clearly i am confused !!!!!!!!!! please explain me the method how you selected those numbers only adn how you concluded ..... Please do reply |
| | |
![]() |
| Tags |
| asked , number , oracle , puzzle |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| tips for interview | ozobalu | HR Questions | 13 | 14-11-09 01:50 AM |
| must read all UG students!!!!!!!!!!!!! | sanjay | Other Queries | 16 | 07-02-09 02:31 PM |
| ORACLE India - Walk-In For BSc and BCA freshers of 2005 & 2006 (0-2 yrs.) | sridhar | Walk-ins | 2 | 04-08-08 10:49 PM |
| Oracle Apps Functional H1b Visa 2007 | sridhar | Experienced Jobs | 0 | 04-03-07 02:12 PM |
| TCS PAPER & INTERVIEW - 23 JUN 2006 | sridhar | TCS Placement Papers | 0 | 12-02-07 05:01 PM |
| More Interview Questions Here... |