Cody

Solution 1792431

Submitted on 18 Apr 2019
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   Pass
a = [257.68]; b = [2 1 0 0 1 1 0 1 0 1 1 3]; out = makingChange(a); assert(isequal(out(:), b(:)))

ans = 2.5768 ans = 1.1536 ans = 0.3840 ans = 0.7680 ans = 1.5360 ans = 1.3400 ans = 0.6800 ans = 1.3600 ans = 0.7200 ans = 1.8000 ans = 1.6000 ans = 3.0000 b = 2 1 0 0 1 1 0 1 0 1 1 3

2   Fail
a = [135.01]; b = [1 0 1 1 1 0 0 0 0 0 0 1]; out = makingChange(a); assert(isequal(out(:), b(:)))

ans = 1.3501 ans = 0.7002 ans = 1.7505 ans = 1.5010 ans = 1.0020 ans = 0.0050 ans = 0.0100 ans = 0.0200 ans = 0.0400 ans = 0.1000 ans = 0.2000 ans = 1.0000 b = 1 0 1 1 1 0 0 0 0 0 0 0

Assertion failed.

3   Fail
a = [10035.99]; b = [100 0 1 1 1 0 0 1 1 2 0 4]; out = makingChange(a); assert(isequal(out(:), b(:)))

ans = 100.3599 ans = 0.7198 ans = 1.7995 ans = 1.5990 ans = 1.1980 ans = 0.4950 ans = 0.9900 ans = 1.9800 ans = 1.9600 ans = 2.4000 ans = 0.8000 ans = 4.0000 b = 100 0 1 1 1 0 0 1 1 2 0 3

Assertion failed.

Suggested Problems