#126Medium
Integer power, negative too
Time: 1 s · Memory: 256 MB
- Recursion
Statement
You are given a real number and an integer . Compute with a recursive function:
Input format
A single line with and . has at most digits after the point, ; . It is guaranteed that .
Output format
with exactly digits after the point (for example, -0.1250).
Examples
Input
2 10
Output
1024.0000
Input
-2 -3
Output
-0.1250
Note
A negative power reduces to a positive one: , so the answer to the second example is . Python — print(f"{v:.4f}"), C++ — printf("%.4f\n", v), Go — fmt.Printf("%.4f\n", v).
