We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
You should find all x,y that verify the given equation and give the number of the solution just note that (x,y) and (y,x) are considered one solution.
Start first by finding the writing of X and Y using arithmetics
As per Algo description, n=1260 than we will have 113 distinct solution, what are those value of solution and what are x and y value which cover 113 possiblity. need small example if possible
these are some example for n=8
we should find all x,y that verify x*y/(x+y)=8
And we get (9,8*9)
(2*6,4*6)
(4*6,2*6)
(8*9,9 )
(2*5,8*5)
(4*4,4*4)
(8*5,2*5)
(4*3,8*3)
(8*3,4*3)
(8*2,8*2)
By removing none distinct
We get
(9,8*9)
(2*6,4*6)
(2*5,8*5)
(4*4,4*4)
try to find x,y using arithmetic
1/1261+1/1588860,1/1262+1/795060,1/1263+1/530460,1/1264+1/398160,1/1265+1/318780,1/1266+1/265860,1/1267+1/228060,1/1269+1/177660,1/1270+1/160020,1/1272+1/133560,1/1274+1/114660,1/1275+1/107100,1/1278+1/89460,1/1280+1/80640,1/1281+1/76860,1/1288+1/57960,1/1290+1/54180,1/1295+1/46620,1/1296+1/45360,1/1302+1/39060,1/1305+1/36540,1/1320+1/27720,1/1323+1/26460,1/1330+1/23940,1/1344+1/20160,1/1350+1/18900,1/1365+1/16380,1/1386+1/13860,1/1400+1/12600,1/1440+1/10080,1/1470+1/8820,1/1512+1/7560,1/1575+1/6300,1/1680+1/5040,1/1890+1/3780,1/2520+1/2520. Ok, they are actually only 36 !?
try solving Diophantine reciprocals I,you'll find that there are 113 solution for 1260. NB: 36 is only the number of multiples of 1260. If you apply the same logic to 8 you wont find the solutions i gave above
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Join us
Create a HackerRank account
Be part of a 26 million-strong community of developers
Please signup or login in order to view this challenge
Project Euler #110: Diophantine reciprocals II
You are viewing a single comment's thread. Return to all comments →
can u add more information which help me to understand the issue
You should find all x,y that verify the given equation and give the number of the solution just note that (x,y) and (y,x) are considered one solution. Start first by finding the writing of X and Y using arithmetics
As per Algo description, n=1260 than we will have 113 distinct solution, what are those value of solution and what are x and y value which cover 113 possiblity. need small example if possible
these are some example for n=8 we should find all x,y that verify x*y/(x+y)=8 And we get (9,8*9) (2*6,4*6) (4*6,2*6) (8*9,9 ) (2*5,8*5) (4*4,4*4) (8*5,2*5) (4*3,8*3) (8*3,4*3) (8*2,8*2) By removing none distinct We get (9,8*9) (2*6,4*6) (2*5,8*5) (4*4,4*4) try to find x,y using arithmetic
1/1261+1/1588860,1/1262+1/795060,1/1263+1/530460,1/1264+1/398160,1/1265+1/318780,1/1266+1/265860,1/1267+1/228060,1/1269+1/177660,1/1270+1/160020,1/1272+1/133560,1/1274+1/114660,1/1275+1/107100,1/1278+1/89460,1/1280+1/80640,1/1281+1/76860,1/1288+1/57960,1/1290+1/54180,1/1295+1/46620,1/1296+1/45360,1/1302+1/39060,1/1305+1/36540,1/1320+1/27720,1/1323+1/26460,1/1330+1/23940,1/1344+1/20160,1/1350+1/18900,1/1365+1/16380,1/1386+1/13860,1/1400+1/12600,1/1440+1/10080,1/1470+1/8820,1/1512+1/7560,1/1575+1/6300,1/1680+1/5040,1/1890+1/3780,1/2520+1/2520. Ok, they are actually only 36 !?
try solving Diophantine reciprocals I,you'll find that there are 113 solution for 1260. NB: 36 is only the number of multiples of 1260. If you apply the same logic to 8 you wont find the solutions i gave above