Given an input and a number N, find the Nth root of the number(s)
Solution Stats
Problem Comments
2 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers59
Suggested Problems
-
The Hitchhiker's Guide to MATLAB
3406 Solvers
-
Sum all integers from 1 to 2^n
17465 Solvers
-
Back to basics 19 - character types
274 Solvers
-
Matlab Basics II - Count rows in a matrix
405 Solvers
-
Solve a System of Linear Equations
14341 Solvers
More from this Author29
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Strictly speaking, your Test Suite only matches the principal root. For example, in the first test case, −1 is also a valid root, as (−1)¹⁰⁰ = +1. See https://en.wikipedia.org/wiki/Nth_root .
Hello, Srishti Saha . All of the 'correct' solutions are requiring rounding of the outputs to pass your Test Suite. That should not be necessary unless you specify it in the Problem Statement; otherwise your Test Suite should allow a tolerance to account for 'floating point errors'. (See Problem 44631.) Please amend. —DIV