Skip to content

Latest commit

 

History

History
20 lines (9 loc) · 264 Bytes

File metadata and controls

20 lines (9 loc) · 264 Bytes

Pow(x,n)

描述

Implement pow(x, n).

分析

二分法,$$x^n = x^{n/2} \times x^{n/2} \times x^{n%2}$$

代码

{% codesnippet "./code/pow."+book.suffix, language=book.suffix %}{% endcodesnippet %}

相关题目