a^b(Set 2)
Submissions: 5382   Accuracy:

25.69%

  Difficulty: Easy   Marks: 2

For two given positive numbers a and b. Find a^b. Output your number modulus 10^9+7.

Input:
The first line contains an integer 'T' denoting the total number of test cases. In each test cases, there are two numbers a and b.


Output:
Find a^b.


Constraints:
1 <= T <= 31
1 <= a <= 100
1 <= b <= 1000000


Example:
Input:
2
1 1
2 5

Output:
1
32

** For More Input/Output Examples Use 'Expected Output' option **

Author: abhiraj26


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.