Obtain Desired Standard Deviation

All submissions for this problem are available.
Given two integers N and σ, find any array a with length N such that the standard deviation of the elements of the array is equal to σ. The standard deviation is given by the following formula:
For each 1 ≤ i ≤ N, a_{i} may be any real number with a_{i} ≤ 10^{8}.
If there is more than one possible answer, you may output any one of them. If there is no such array, output 1 instead.
Please note that the denominator only contains N. (In the usual formula for standard deviation, N1 is used. That's not the definition we're using here.)
Input
The first line of the input contains an integer T denoting the number of test cases. The description of the test cases follows.
The first and only line of each test case contains two space separated integers N, σ.
Output
For each test case, output a single line containing N spaceseparated real numbers denoting the elements of the array a.
If it is not possible to construct such an array, output 1 instead. If there is more than one possible solution, you may output any one.
Your answer will be considered correct if the standard deviation of the printed array doesn't differ from σ by more than 10^{2} in absolute value.
Constraints
 1 ≤ T ≤ 10^{5}
 1 ≤ N ≤ 10^{5}
 0 ≤ σ ≤ 10^{5}
 Sum of N over all test cases won't exceed 10^{6}
Example
Input 3 2 2 3 3 4 0 Output 2 6 3.5 2 8.979967 3 3 3 3
Author:  admin2 
Tags  acmind17, adhoc, admin2, simple 
Date Added:  30102017 
Time Limit:  1 sec 
Source Limit:  50000 Bytes 
Languages:  C, CPP14, JAVA, PYTH, PYTH 3.5, PYPY 
Comments
 Please login at the top to post a comment.
SUCCESSFUL SUBMISSIONS
Fetching successful submissions
HELP
If you are still having problems, see a sample solution here. 