Given two integers k and n, write a function to compute k^n.

Problem Note

  • You can assume that k and n are small and overflow doesn’t happen.
  • Also, the value of n is >= 0

Example 1

Input: k = 4, n = 2
Output: 16

Example 2

Input: k = -7, n = 3
Output: -343

Example 3

Input: k = 1, n = 4
Output: 1

Example 4

Input: k = 4, n = 0
Output: 1