Problem A
Extended GCD
Languages
en
is
Implement an algorithm to find the greatest common divisor
of two integers
Input
Input is two lines. The fyrst line contains the integer
Output
Output three lines. The first line should contain the
integer
Scoring
Group |
Points |
Constraints |
1 |
60 |
|
2 |
20 |
|
3 |
20 |
|
Sample Input 1 | Sample Output 1 |
---|---|
6 15 |
3 -2 1 |
Sample Input 2 | Sample Output 2 |
---|---|
4 0 |
4 1 0 |
Sample Input 3 | Sample Output 3 |
---|---|
6 15 |
3 3 -1 |