快速幂

Implement a function myPow(x, n) to calculate x raised to the power n.

# Example:
# Input: x = 2.00000, n = 10
# Output: 1024.00000

# Input: x = 2.10000, n = 3
# Output: 9.26100

# I...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: