BlueBook - Power Base

View as PDF

Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 16M

Problem types
BlueBook

Write a program that reads a real value X (-11 \le X \le 11) and a positive integer P (2 \le P \le 10) and then calculates and prints the value of X^P.

Input Specification

The first line of input will be the number of test cases, N (0 \le N \le 5). Each of the N test cases will have 2 numbers on each line.

Output Specification

All answers should be to 2 decimal places.

Sample Input

3
2.0 4
4.0 2
3.0 3

Sample Output

16.00
16.00
27.00

Comments

There are no comments at the moment.