Re: [algogeeks] Find the Pair of X,Y [ 1/x + 1/y = 1/N! ]

2012-06-26 Thread Kishore
Go thru this http://stackoverflow.com/questions/8650827/sample-testcase-for-interviewstreet-equationsyou should be able to solve the question On Tue, Jun 26, 2012 at 1:58 AM, prakash y yprakash@gmail.com wrote: @Vishal, If the output should be the total no.of pairs, then i think there are

Re: [algogeeks] Find the Pair of X,Y [ 1/x + 1/y = 1/N! ]

2012-06-26 Thread Kumar Vishal
@Kishore in below link no one deals with how to calculate or escape calculating factorial (n) On Tue, Jun 26, 2012 at 12:28 PM, Kishore kkishoreya...@gmail.com wrote: Go thru this http://stackoverflow.com/questions/8650827/sample-testcase-for-interviewstreet-equationsyou should be

Re: [algogeeks] Find the Pair of X,Y [ 1/x + 1/y = 1/N! ]

2012-06-26 Thread Kumar Vishal
@ SAM Thanks On Tue, Jun 26, 2012 at 8:21 PM, SAMM somnath.nit...@gmail.com wrote: 1 /x + 1/y = 1/(n!) * Consider N = n! , * *The Equation becoz :-* 1/x + 1/y = 1/N or (x+y)/xy = 1/N or N( x + y ) = xy *Changing sides we get :-* xy - N(x+y) = 0 *Adding N^2 on both sides

Re: [algogeeks] Find the Pair of X,Y [ 1/x + 1/y = 1/N! ]

2012-06-25 Thread prakash y
2! - x=y=4 3! - x=y=12 4! - x=y=48 5! - x=y=240 6! - x=y=1440 I don't have proof to prove x = y always. But if x=y, then the answer should be x=y=2*n! On Mon, Jun 25, 2012 at 5:04 PM, Roshan kumar...@gmail.com wrote: Few Months back I found the problem on Code Sprint 1/x + 1/y = 1/N! (N

Re: [algogeeks] Find the Pair of X,Y [ 1/x + 1/y = 1/N! ]

2012-06-25 Thread Kishore
This is from interviewstreet named with equations On Mon, Jun 25, 2012 at 11:19 AM, prakash y yprakash@gmail.com wrote: 2! - x=y=4 3! - x=y=12 4! - x=y=48 5! - x=y=240 6! - x=y=1440 I don't have proof to prove x = y always. But if x=y, then the answer should be x=y=2*n! On Mon, Jun

Re: [algogeeks] Find the Pair of X,Y [ 1/x + 1/y = 1/N! ]

2012-06-25 Thread Kumar Vishal
@Prakash The Pattern given by u is because factorial (n) is always *even *so u can always divide them in two equal part . what about 1/6= 1/8 + 1/24( 6 = factorial (3)) On Mon, Jun 25, 2012 at 11:24 PM, Kishore kkishoreya...@gmail.com wrote: This is from interviewstreet

Re: [algogeeks] Find the Pair of X,Y [ 1/x + 1/y = 1/N! ]

2012-06-25 Thread Kumar Vishal
Sorry My Mistake *Number of pairs should be OUTPUT...* On Mon, Jun 25, 2012 at 8:49 PM, prakash y yprakash@gmail.com wrote: 2! - x=y=4 3! - x=y=12 4! - x=y=48 5! - x=y=240 6! - x=y=1440 I don't have proof to prove x = y always. But if x=y, then the answer should be x=y=2*n! On

Re: [algogeeks] Find the Pair of X,Y [ 1/x + 1/y = 1/N! ]

2012-06-25 Thread prakash y
@Vishal, If the output should be the total no.of pairs, then i think there are infinite no.of such pairs. but not sure. Can someone provide me the link to the actual problem and some analysis of solution? Thanks, ~Prakash. On Mon, Jun 25, 2012 at 9:45 PM, Kumar Vishal kumar...@gmail.com wrote: