📅  最后修改于: 2022-03-11 14:57:25.350000             🧑  作者: Mango
FUNCTION pow(base, exponent)
IF exponent == 0
RETURN 1
ELSE IF exponent is even
RETURN pow(base * base, exponent / 2)
ELSE
RETURN base * pow(base * base, (exponent - 1) / 2)
END IF