Description: You are given two integers a and b. Your task is to find the value of a raised to the power b (a^b) and print the result.
Example 1
Input: a = 2, b = 3
Output: 8
Explanation: 2^3 = 8
Example 2
Input: a = 5, b = 4
Output: 625
Explanation: 5^4 = 625
Approach, complexity and clean code in every language. Sign in to unlock the editorial.
Your submissions, results and runtime history live here. Sign in to start your streak.
5 4
625
5 2
25