(x, d, n, p, q, cp, cq)
return int((rp * cp + rq * cq) % n)
return int: (a ** b) % n
return int: (a ** b) % n
return int : ( a ** b ) % n
def powmod_crt(x, d, n, p, q, cp, cq):
    """
    return int: (a ** b) % n
    """

    rp = gmpy2.powmod(x, d % (p - 1), p)
    rq = gmpy2.powmod(x, d % (q - 1), q)
    return int((rp * cp + rq * cq) % n)
def powmod_crt ( x , d , n , p , q , cp , cq ) : rp = gmpy2 . powmod ( x , d % ( p - 1 ) , p ) rq = gmpy2 . powmod ( x , d % ( q - 1 ) , q ) return int ( ( rp * cp + rq * cq ) % n )