Power of (a^b)
Easy Acceptance 85.00% Points 20.00
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.
Examples
Example 1
Example 1
Input: a = 2, b = 3
Output: 8
Explanation: 2^3 = 8
Example 2
Example 2
Input: a = 5, b = 4
Output: 625
Explanation: 5^4 = 625
Constraints
- Constraints: 1 < a < 50
- 0 < b < 50
Companies
Apple Samsung IBM
Track your submissions
Please log in to review your progress and explore code submissions from other participants.
Unlock the full solution
Please log in to access detailed answers and explanations.
Join the discussion
Please log in to join conversations with other participants.