快速幂

117 阅读1分钟

摘自leetcode用户Krahets的题解。 image.png

image.png

image.png

image.png

image.png 例题:

50. Pow(x, n)

剑指 Offer 16. 数值的整数次方