Square without Multiplication, Division & Pow

Medium

You are given a positive integer num. Find its square.
You cannot use the multiplication or division operator. Also the power function of any library is not allowed.

Testing

Input Format

The first line contains an integer ‘T’ denoting the number of test cases.

For each test case, the input a line with the integer num.

Output Format

For each test case, the output has one line containing the square of num.

Sample Input

3
1
5
10

Expected Output

1
25
100

Constraints

1 <= T <= 10000
1 <= num <= 10000

Editorial Link: Editorial