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.
- Prepare
- Mathematics
- Geometry
- Solve Equations
- Discussions
Solve Equations
Solve Equations
Sort by
recency
|
7 Discussions
|
Please Login in order to post a comment
I don't why there is Run Time ERROR (for higher values of a,b,c) even in time complexicity O(n).
This is not a geometry exercise
Hi,
There seems to be something wrong with this problem :
The linear diophantine equation a*x+b*y=c hasn't always integer solutions, if no constraint at all is imposed to a, b, and c.
The following wikipedia article (in french) explains it :
linear diophantine equation (french)
Sorry, but the article on Wikipedia is only available in French.
Best regards
Is this not resolved by the constraint that a, b, c are all integers?
"Each line of the subsequent lines contains three space-separated integers describing the respective values of a, b, and c for the query."
can anybody give some hints?
I think there is another error in the testcases.
Testcase 2
Testcase 3
I second this.
the point (1,78) is much further from the origin than the point (19,6). Same goes for (2,3) and (1,13).
Based on the answer, it's the closest to origin; but in the descrption, it clearly says it's the one with minimal x value.
The first most important is that it's closest to the origin. After that, if there's a tie it goes to minimal x. The important section in the description is this:
" Find the point closest to the origin that also satisfies the following properties:
If more than one solution exists satisfying 1 and 2, then choose the point in which x is minimal. "
So for example the point (1,2) and (2,1) are equally close to the origin; if these were both solutions to the equation, (1,2) would be the correct choice. But (1,8) is further away from the origin than (2,3); if these were both solutions to the equation, (2,3) would be the correct choice.
I hope that helps clarify.
i think so too..