Let x , y be a pair of integers that satisfy the equation
2 3 3 9 8 7 9 7 3 x + 4 1 1 1 1 6 8 7 y = 1
What is the value of
( x m o d 4 1 1 1 1 6 8 7 ) + ( y m o d 2 3 3 9 8 7 9 7 3 ) ?
If you think there is no answer or exist multiple answers to this problem, write − 1 .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
We can see, that equation in the statement has the next form:
a ⋅ x + b ⋅ y = g c d ( a , b ) (Bezout's identity)
To solve it we can use extended Euclidean algorithm. Using such algorithm we can found only one solution, but this equation has infinite amount of solutions. All solutions we can found in this way:
Let's suppose that the numbers x 0 and y 0 are a solution for our equation. We can found all solutions using such formula:
{ x = x 0 + k ⋅ g b , y = y 0 − k ⋅ g a , where g = g c d ( a , b ) and k ∈ Z .
For this statement all solutions can be found as following:
{ x = x 0 + k ⋅ b , y = y 0 − k ⋅ a ,
And finally, we need to understand, that:
{ x ≡ x 0 ( m o d b ) , y ≡ y 0 ( m o d a )
This is programmatic solution:
1 2 3 4 5 6 7 8 9 10 |
|
Problem Loading...
Note Loading...
Set Loading...
This is not a complete solution. The following is the program to solve this problem.