Cody

Problem 45248. Aquiles y la tortuga

Solution 2078542

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));

sumaa = 0.1250 0.1250 0.1250

Assertion failed.

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))

sumaa = 0.0625 0.0625 0.0625 0.0625

Assertion failed.

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))

sumaa = 0.0156 0.0156 0.0156 0.0156 0.0156 0.0156

Assertion failed.

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))

sumaa = 1.0e-03 * 0.9766 0.9766 0.9766 0.9766 0.9766 0.9766 0.9766 0.9766 0.9766 0.9766

Assertion failed.

Community Treasure Hunt

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

Start Hunting!