Create a custom function in R to calculate the nth power of a number.
MediumProblem Statement
Create a custom function in R to calculate the nth power of a number.
Sample Input
Base: 2 Exponent: 4
Sample Output
Result: 16
Limits
Time: 2s · Memory: 256 MB