Print Multiplication Table - I

You are given an integer N for each test case. Print the multiplication table of N from 1 to 10.

Input

  • The first line contains an integer T, the number of test cases.
  • Each of the next T lines contains one integer N.

Output

For each test case, print the first 10 multiples of N, from N × 1 through N × 10, separated by a single space. Print each test case result on a new line, without labels or trailing spaces.

Example 1:

Input:

2
5
3

Output:

5 10 15 20 25 30 35 40 45 50
3 6 9 12 15 18 21 24 27 30

Explanation:

The first output line contains the first 10 multiples of 5.

The second output line contains the first 10 multiples of 3.

Example 2:

Input:

2
2
10

Output:

2 4 6 8 10 12 14 16 18 20
10 20 30 40 50 60 70 80 90 100

Explanation:

The output lines contain the multiplication tables of 2 and 10.

Now Your Turn!

Pick the correct output for the given input

Input:

1
4

Still unsure what the problem is asking ?

Let’s go through a few more examples, step by step, to make it clearer.

Constraints:

  • 1 <= T <= 100
  • 2 <= N <= 100

Hints

Frequently Occurring Doubts

Interview Follow-up Questions

0
#include <bits/stdc++.h>
using namespace std;
 
int main() {
// Your code goes here
}
Test Case
Input