lc50. Pow(x, n)
Contents
Implement pow(x, n), which calculates x
raised to the power n
(i.e., xn
).
Example 1:
|
|
Example 2:
|
|
Example 3:
|
|
Constraints:
-100.0 < x < 100.0
-231 <= n <= 231-1
-104 <= xn <= 104