Cody

Solution 472055

Submitted on 14 Jul 2014 by Alvery
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(:)))

b = 2 a = 57.6801 b = 2 1 a = 7.6802 b = 2 1 0 a = 7.6803 b = 2 1 0 0 a = 7.6804 b = 2 1 0 0 1 a = 2.6805 b = 2 1 0 0 1 1 a = 0.6806 b = 2 1 0 0 1 1 0 a = 0.6807 b = 2 1 0 0 1 1 0 1 a = 0.1808 b = 2 1 0 0 1 1 0 1 0 a = 0.1809 b = 2 1 0 0 1 1 0 1 0 1 a = 0.0810 b = 2 1 0 0 1 1 0 1 0 1 1 a = 0.0311 b = 2 1 0 0 1 1 0 1 0 1 1 3 a = 0.0012

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

b = 1 a = 35.0101 b = 1 0 a = 35.0102 b = 1 0 1 a = 15.0103 b = 1 0 1 1 a = 5.0104 b = 1 0 1 1 1 a = 0.0105 b = 1 0 1 1 1 0 a = 0.0106 b = 1 0 1 1 1 0 0 a = 0.0107 b = 1 0 1 1 1 0 0 0 a = 0.0108 b = 1 0 1 1 1 0 0 0 0 a = 0.0109 b = 1 0 1 1 1 0 0 0 0 0 a = 0.0110 b = 1 0 1 1 1 0 0 0 0 0 0 a = 0.0111 b = 1 0 1 1 1 0 0 0 0 0 0 1 a = 0.0012

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

b = 100 a = 35.9901 b = 100 0 a = 35.9902 b = 100 0 1 a = 15.9903 b = 100 0 1 1 a = 5.9904 b = 100 0 1 1 1 a = 0.9905 b = 100 0 1 1 1 0 a = 0.9906 b = 100 0 1 1 1 0 0 a = 0.9907 b = 100 0 1 1 1 0 0 1 a = 0.4908 b = 100 0 1 1 1 0 0 1 1 a = 0.2409 b = 100 0 1 1 1 0 0 1 1 2 a = 0.0410 b = 100 0 1 1 1 0 0 1 1 2 0 a = 0.0411 b = 100 0 1 1 1 0 0 1 1 2 0 4 a = 0.0012