Cody

# Problem 44344. The 5th Root

Solution 2103724

Submitted on 23 Jan 2020
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Fail
filetext = fileread('fifth_root.m'); assert(isempty(strfind(filetext, '^')),'^ forbidden') assert(isempty(strfind(filetext, 'power')),'power() forbidden') assert(isempty(strfind(filetext, 'mpower')),'mpower() forbidden') assert(isempty(strfind(filetext, 'realpow')),'realpow() forbidden') assert(isempty(strfind(filetext, 'nthroot')),'nthroot() forbidden') assert(isempty(strfind(filetext, 'roots')),'roots() forbidden')

Error in solution: Line: 1 Column: 21 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

2   Fail
n = 1/9765625; assert(abs(fifth_root(n)-1/25)<1e-5)

Error in solution: Line: 1 Column: 21 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

3   Fail
n = 1/5555; assert(abs(fifth_root(n)-0.178263811215444)<1e-5)

Error in solution: Line: 1 Column: 21 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

4   Fail
n = 1/3125; assert(abs(fifth_root(n)-1/5)<1e-5)

Error in solution: Line: 1 Column: 21 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

5   Fail
n = 1/125; assert(abs(fifth_root(n)-0.380730787743176)<1e-5)

Error in solution: Line: 1 Column: 21 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

6   Fail
n = 1/5; assert(abs(fifth_root(n)-0.724779663677696)<1e-5)

Error in solution: Line: 1 Column: 21 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

7   Fail
n = 1; assert(abs(fifth_root(n)-1)<1e-5)

Error in solution: Line: 1 Column: 21 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

8   Fail
n = 5; assert(abs(fifth_root(n)-1.37972966146121)<1e-5)

Error in solution: Line: 1 Column: 21 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

9   Fail
n = 25; assert(abs(fifth_root(n)-1.90365393871588)<1e-5)

Error in solution: Line: 1 Column: 21 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

10   Fail
n = 50; assert(abs(fifth_root(n)-2.18672414788656)<1e-5)

Error in solution: Line: 1 Column: 21 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

11   Fail
n = 500; assert(abs(fifth_root(n)-3.46572421577573)<1e-5)

Error in solution: Line: 1 Column: 21 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

12   Fail
n = 3125; assert(abs(fifth_root(n)-5)<1e-5)

Error in solution: Line: 1 Column: 21 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

13   Fail
n = 759375; assert(abs(fifth_root(n)-15)<1e-5)

Error in solution: Line: 1 Column: 21 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

14   Fail
n = 9765625; assert(abs(fifth_root(n)-25)<1e-5)

Error in solution: Line: 1 Column: 21 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

15   Fail
n = 312500000; assert(abs(fifth_root(n)-50)<1e-5)

Error in solution: Line: 1 Column: 21 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

16   Fail
n = 75937500000; assert(abs(fifth_root(n)-150)<1e-5)

Error in solution: Line: 1 Column: 21 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

17   Fail
n = 31250000000000; assert(abs(fifth_root(n)-500)<1e-5)

Error in solution: Line: 1 Column: 21 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

18   Fail
n = 52658067346875; assert(abs(fifth_root(n)-555)<1e-5)

Error in solution: Line: 1 Column: 21 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.