pub fn gcd(a: i64, b: i64) -> (i64, i64, i64) {
    if b == 0 {
        (a, 1, 0)
    } else {
        let n = a / b;
        let c = a % b;
        let r = gcd(b, c);
        (r.0, r.2, r.1 - r.2 * n)
    }
}
/// Euclidean GCD implementation (recursive). The first member of the returned
/// triplet is the GCD of `a` and `b`.
Euclidean GCD implementation (recursive). The first member of the returned
triplet is the GCD of `a` and `b`.
Euclidean GCD implementation ( recursive ) . The first member of the returned triplet is the GCD of ` a ` and ` b ` .
pub fn gcd(a: i64, b: i64) -> (i64, i64, i64) {
    if b == 0 {
        (a, 1, 0)
    } else {
        let n = a / b;
        let c = a % b;
        let r = gcd(b, c);
        (r.0, r.2, r.1 - r.2 * n)
    }
}
pub fn gcd ( a : i64 , b : i64 ) -> ( i64 , i64 , i64 ) { if b == 0 { ( a , 1 , 0 ) } else { let n = a / b ; let c = a % b ; let r = gcd ( b , c ) ; ( r . 0 , r . 2 , r . 1 - r . 2 * n ) } }
Euclidean GCD implementation (recursive).
Euclidean GCD implementation ( recursive ) .
a
i64
b
i64