Update CalculatePower.java

Calculate x to the power y.
Constraint
Complexity should be less than O(n).