def continued_fraction(a, b):
    """Get continued fraction representation of a/b."""
    q, r = a // b, a % b
    c = [q]
    while r:
        a, b = b, r
        q, r = a // b, a % b
        c.append(q)
    return c