Cody

# Problem 45248. Aquiles y la tortuga

Solution 2078541

Submitted on 3 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
n = 3; suma = [1/2 (1/2+1/4) (1/2+1/4+1/8)]; assert(isequal(mi_funcion(n),suma));

suma = 0.1250 0.1250 0.1250

Output argument "sumaa" (and maybe others) not assigned during call to "mi_funcion". Error in Test1 (line 3) assert(isequal(mi_funcion(n),suma));

2   Fail
n = 4; suma = [1/2 (1/2+1/4) (1/2+1/4+1/8) (1/2+1/4+1/8+1/16)]; assert(isequal(mi_funcion(n),suma))

suma = 0.0625 0.0625 0.0625 0.0625

Output argument "sumaa" (and maybe others) not assigned during call to "mi_funcion". Error in Test2 (line 3) assert(isequal(mi_funcion(n),suma))

3   Fail
n = 6; suma = [1/2 (1/2+1/4) (1/2+1/4+1/8) (1/2+1/4+1/8+1/16) (1/2+1/4+1/8+1/16+1/32) (1/2+1/4+1/8+1/16+1/32+1/64)]; assert(isequal(mi_funcion(n),suma))

suma = 0.0156 0.0156 0.0156 0.0156 0.0156 0.0156

Output argument "sumaa" (and maybe others) not assigned during call to "mi_funcion". Error in Test3 (line 3) assert(isequal(mi_funcion(n),suma))

4   Fail
n = 10; suma = [1/2 (1/2+1/4) (1/2+1/4+1/8) (1/2+1/4+1/8+1/16) (1/2+1/4+1/8+1/16+1/32) (1/2+1/4+1/8+1/16+1/32+1/64) (1/2+1/4+1/8+1/16+1/32+1/64+1/2^7) (1/2+1/4+1/8+1/16+1/32+1/64+1/2^7+1/2^8) (1/2+1/4+1/8+1/16+1/32+1/64+1/2^7+1/2^8+1/2^9) (1/2+1/4+1/8+1/16+1/32+1/64+1/2^7+1/2^8+1/2^9+1/2^10)]; assert(isequal(mi_funcion(n),suma))

suma = 1.0e-03 * 0.9766 0.9766 0.9766 0.9766 0.9766 0.9766 0.9766 0.9766 0.9766 0.9766

Output argument "sumaa" (and maybe others) not assigned during call to "mi_funcion". Error in Test4 (line 3) assert(isequal(mi_funcion(n),suma))

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!