Cody

Solution 215886

Submitted on 11 Mar 2013 by Bishes Rayamajhi
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(:)))

x2 = 0 0 0 0 0 0 0 0 0 0 0 0 zz = 257.6800 x2 = 2 0 0 0 0 0 0 0 0 0 0 0 zz = 57.6800 x2 = 2 1 0 0 0 0 0 0 0 0 0 0 zz = 7.6800 x2 = 2 1 0 0 1 0 0 0 0 0 0 0 zz = 2.6800 x2 = 2 1 0 0 1 1 0 0 0 0 0 0 zz = 0.6800 x2 = 2 1 0 0 1 1 0 1 0 0 0 0 zz = 0.1800 x2 = 2 1 0 0 1 1 0 1 0 1 0 0 zz = 0.0800 x2 = 2 1 0 0 1 1 0 1 0 1 1 0 zz = 0.0300 x2 = 2 1 0 0 1 1 0 1 0 1 1 3 zz = 9.0000e-06

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

x2 = 0 0 0 0 0 0 0 0 0 0 0 0 zz = 135.0100 x2 = 1 0 0 0 0 0 0 0 0 0 0 0 zz = 35.0100 x2 = 1 0 1 0 0 0 0 0 0 0 0 0 zz = 15.0100 x2 = 1 0 1 1 0 0 0 0 0 0 0 0 zz = 5.0100 x2 = 1 0 1 1 1 0 0 0 0 0 0 0 zz = 0.0100 x2 = 1 0 1 1 1 0 0 0 0 0 0 1 zz = 6.0000e-06

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

x2 = 0 0 0 0 0 0 0 0 0 0 0 0 zz = 1.0036e+04 x2 = 100 0 0 0 0 0 0 0 0 0 0 0 zz = 35.9900 x2 = 100 0 1 0 0 0 0 0 0 0 0 0 zz = 15.9900 x2 = 100 0 1 1 0 0 0 0 0 0 0 0 zz = 5.9900 x2 = 100 0 1 1 1 0 0 0 0 0 0 0 zz = 0.9900 x2 = 100 0 1 1 1 0 0 1 0 0 0 0 zz = 0.4900 x2 = 100 0 1 1 1 0 0 1 1 0 0 0 zz = 0.2400 x2 = 100 0 1 1 1 0 0 1 1 2 0 0 zz = 0.0400 x2 = 100 0 1 1 1 0 0 1 1 2 0 4 zz = 9.0000e-06

Suggested Problems

More from this Author95