
Asked in Procol
Power of a Number Problem
You are given two integers, X
and N
. Your task is to compute the value of X
raised to the power of N
(i.e., X^N
).
Input:
The first line contains an integer T
, the number of test cases.
Each of the next T
lines contains two space-separated integers X
and N
.
Output:
For each test case, output a single integer which is the result of X^N
.
Each result should be printed on a new line.
Example:
Input:
3
2 3
5 0
10 2
Output:
8
1
100
Constraints:
1 <= T <= 5
0 <= X <= 10
0 <= N <= 10
Note:
Assume that 0^0
is 1
.

AnswerBot
4mo
Compute the value of X raised to the power of N for given integers X and N.
Read the number of test cases T
For each test case, read the values of X and N
Calculate X^N for each test case
Print the result...read more
Help your peers!
Add answer anonymously...
Top Software Developer Intern Interview Questions Asked at Procol
Q. Minimum Operations to Equalize Array Given an integer array ARR of length N wher...read more
Q. Search in Infinite Sorted 0-1 Array Problem Statement You are provided with an i...read more
Q. Pair Sum Problem Statement You are given an integer array 'ARR' of size 'N' and ...read more
Interview Questions Asked to Software Developer Intern at Other Companies
Top Skill-Based Questions for Procol Software Developer Intern
C++ Interview Questions and Answers
300 Questions
Algorithms Interview Questions and Answers
250 Questions
Data Structures Interview Questions and Answers
250 Questions
Web Development Interview Questions and Answers
250 Questions
Operating Systems Interview Questions and Answers
250 Questions
System Design Interview Questions and Answers
250 Questions
Stay ahead in your career. Get AmbitionBox app


Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+
Reviews
10L+
Interviews
4 Cr+
Salaries
1.5 Cr+
Users
Contribute to help millions
AmbitionBox Awards
Get AmbitionBox app

