#include #include #define rp(n) for(int i=0;i=0;i--) #define Rep(i,sta,n) for(int i=sta;i=sta;i--) #define fore(i, a) for(auto &&i : a) #define foreP(a, b, v) for(auto &&[a, b] : v) #define foreP3(a, b, c, v) for(auto &&[a, b, c] : v) #define fitr(itr, m) for(auto &&itr=m.begin();itr!=m.end();itr++) #define all(v) (v).begin(),(v).end() #define Sum(a) accumulate(all(a),0LL) #define VC vector #define TP tuple using namespace std; mt19937 engine(time(0)); using ll = long long; using ld = long double; constexpr long long mod = 998244353; // constexpr long long mod = 1000000007; // constexpr long long mod = 100000000000000003; constexpr long double PI=3.1415926535897932384626433832795028841971; constexpr long long inf = INT_MAX; constexpr long long infll = LONG_MAX; templateusing MaxHeap = priority_queue; templateusing MinHeap = priority_queue, greater>; templatevoid chmin(T& a, T b) {a = min(a, b);} templatevoid chmax(T& a, T b) {a = max(a, b);} templatevoid debug(T a){cerr << a << endl;} templatevoid debug(T a, S b){cerr << a << " " << b << endl;} templatevoid debug(T a,S b,U c){cerr <<"( "<< a << " " << b << " " << c <<" )" << endl;} templatevoid debug(T a,S b,U c,W d){cerr <<"( "<< a << " " << b << " " << c<< " " << d <<" )" << endl;} templatevoid debug(vector v){for(int i=0;ivoid debug(set m){for(auto itr: m){cerr << itr << " ";}cerr << endl;} templatevoid debug(map m){for(auto itr=m.begin();itr!=m.end();itr++)cerr <<"("<< itr->first << " => " << itr->second<<")" << endl;} templatevoid debug(pair p){cerr <<"( "<< p.first << ", " << p.second <<" )" << endl;} templatevoid debug(tuple t){cerr <<"( "<< get<0>(t) << ", " << get<1>(t) <<" )" << endl;} templatevoid debug(tuple t){cerr <<"( "<< get<0>(t) << ", " << get<1>(t)<< ", " << get<2>(t) <<" )" << endl;} templatevoid debug(tuple t){cerr <<"( "<< get<0>(t) << ", " << get<1>(t)<< ", " << get<2>(t)<< ", " << get<3>(t) <<" )" << endl;} templatevoid out(T a){ cout << a << endl;} templatevoid out(T a,S b){ cout << a <<" " << b << endl;} templatevoid out(T a,S b,U c){ cout << a <<" " << b <<" " << c << endl;} templatevoid out(vector v){ for(int i=0;ivoid out(set m){for(auto itr: m){cout << itr; if((itr+1)==m.endl()) cout << endl;else cout << " ";}} templatevoid out(pair p){cout << p.first << " " << p.second << endl;} templatevoid out(tuple t){cout << get<0>(t) << " " << get<1>(t) << endl;} templatevoid out(tuple t){cout << get<0>(t) << " " << get<1>(t)<< " " << get<2>(t) << endl;} void yes(bool f=1,string yes="Yes",string no="No"){if(f){cout << yes << endl;}else{cout << no << endl;}} struct S { int x; int y; S(int x, int y) : x(x),y(y){} bool operator<(const struct S& other) const { return x < other.x; } void debug(){ cerr <<"debug " << x <<"-" << y << endl; } }; void solve(){ ld R; int k; cin >> R >> k; VC p(k,0.0); rep(i,k){ ld s = PI/2.0*(i+1)/(k+1); ld l = -1,r = 1; while (r-l>0.0000000001) { ld c = (r-l)/2+l; // debug(c); ld sita=acos(c); ld ss; if(c<0) ss = PI-sita/2.0-abs(c)*sqrt(1.0-c*c)/2.0; else ss = sita/2.0-abs(c)*sqrt(1.0-c*c)/2.0; if(s<=ss){ l = c; }else{ r = c; } } p[i] = l*R; } rep(i,k/2){ p[i+k/2] = -1*p[i]; } sort(all(p)); rep(i,k)out(p[i]); return; } int main() { cin.tie(nullptr); ios::sync_with_stdio(false); cout<> t; while(t--) solve(); return 0; }