题目描述

Write a recursive function power( base, exponent ) that, when invoked, returns:
$$base^{exponent} $$
For example, power( 3, 4 ) = 3 3 3 * 3. Assume that exponent is an integer greater than or equal to 1. Hint: The recursion step would use the relationship
$$\text { base }^{\text {exponent }}=\text { base } \cdot \text { base }^{\text {exponent - 1}}$$
and the terminating condition occurs when exponent is equal to 1, because
$$base^{1} = base$$


输入格式

You need to input parameter n to determine the number of test samples.


输出格式


样例数据

输入

3
2 2
2 4
2 6

输出

4
16
64

备注


操作

评测记录

优秀代码

信息

时间限制: 1s
内存限制: 128MB
评测模式: Normal

题解