#include<iostream>
#include<math.h>
using namespace std;
#define PI acos(-1)
int main()
{
    int t;
    cin >> t;
    while(t--)
    {
        int n,x;
        cin >> n >> x;
        double ans = pow(n,PI);
        printf("%.*f\n",x,ans); //保留x位!
    }
    return  0;
}

	if (x < n) {
        int y = x;
        while (p[y] != x + 1) {
            y++;
        }
        std::reverse(p.begin() + x, p.begin() + y + 1); 
    }


    for (int i = 0; i < n; i++) {
        std::cout << p[i] << " \n"[i == n-1]; 表达式为真输出s[1],否则输出s[0],用来避免行末空格1
    }