Login

Striver SDE Sheet Problems

Problem title

Difficulty

Avg time to solve

Nth Root Of M

Easy

10 mins

Cycle Detection In Undirected Graph

Moderate

--

Power Set

Easy

15 mins

Binary Tree Zigzag Traversal

Easy

15 mins

Maximum meetings

Easy

10 mins

Detect Cycle In A Directed Graph

Moderate

30 mins

Largest rectangle in a histogram

Hard

25 mins

Connect Nodes at Same Level

Moderate

30 mins

Strongly Connected Components (Tarjan’s Algorithm)

Hard

15 mins

Median of two sorted arrays

Hard

25 mins

Problem

Submissions

3

Avg. time to solve

10 min

Success Rate

90%

Problem Statement

```
N'th root of an integer M is a real number, which when raised to the power N gives M as a result.
N'th root of the M should be correct up to 6 decimal places.
```

```
The first line of the input contains an integer T denoting the number of test cases.
The first and only line of each test case consists of two space-separated integers N and M.
```

```
For each test case, print a real number with precision till 6 decimal places that denote the Nth root of M in a separate line.
```

```
You don't have to print anything, it has already been taken care of. Just Implement the given function.
```

```
1<= T <= 10^3
1<= N <= 300
1<= M <= 10^15
Time Limit: 1 sec.
```

```
1
3 27
```

```
3.000000
```

```
3rd Root of 27 is 3.000000, as (3.000000)^3 is equal to 27.
```

```
1
4 69
```

```
2.882121
```

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