Login

Striver SDE Sheet Problems

Problem title

Difficulty

Avg time to solve

Reverse Pairs

Hard

50 mins

Ninja And Ladoos

Hard

10 mins

Detect the first node of the loop

Moderate

10 mins

Count Set Bits

Hard

15 mins

K-th Permutation Sequence

Moderate

15 mins

Ninja at the Gym

Moderate

10 mins

Calculate square of a number

Easy

15 mins

Combination Sum II

Moderate

30 mins

Find Pattern in String

Easy

10 mins

Z Algorithm

Hard

15 mins

Problem

Submissions

2

Avg. time to solve

15 min

Success Rate

85%

Problem Statement

```
The first line contains a single integer ‘T’ denoting the number of test cases.
Each test case contains a single line with a single integer ‘N’ denoting the given number.
```

```
For each test case, print the square of the given number in a separate line.
```

```
You do not need to print anything; it has already been taken care of.
```

```
1 <= T <= 50
-10000 <= N <= 10000
Time Limit: 1 sec.
```

```
2
3
-4
```

```
9
16
```

```
In the first test case, the square of 3 is 9.
In the second test case, the square of -4 is 16.
```

```
2
-13
1
```

```
169
1
```

Console

Sample Test Case

Custom Test Case

Download Test Cases

Test Case 1

Test Case 2

Test Case 3

Saving Code...

Full Screen Mode

Change Language

Change Theme

Solution submission not allowed

Save Code

Reset Code