Cody

Solution 601493

Submitted on 24 Mar 2015 by Alexander Razmyslov
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(:)))

c = Columns 1 through 9 100.0000 50.0000 20.0000 10.0000 5.0000 2.0000 1.0000 0.5000 0.2500 Columns 10 through 12 0.1000 0.0500 0.0100 i = 1 i = 2 i = 3 b = 2 a = 57.6800 a = 57.6800 i = 1 i = 2 b = 2 1 a = 7.6800 a = 7.6800 i = 1 b = 2 1 0 a = 7.6800 a = 7.6800 i = 1 b = 2 1 0 0 a = 7.6800 a = 7.6800 i = 1 i = 2 b = 2 1 0 0 1 a = 2.6800 a = 2.6800 i = 1 i = 2 b = 2 1 0 0 1 1 a = 0.6800 a = 0.6800 i = 1 b = 2 1 0 0 1 1 0 a = 0.6800 a = 0.6800 i = 1 i = 2 b = 2 1 0 0 1 1 0 1 a = 0.1800 a = 0.1800 i = 1 b = 2 1 0 0 1 1 0 1 0 a = 0.1800 a = 0.1800 i = 1 i = 2 b = 2 1 0 0 1 1 0 1 0 1 a = 0.0800 a = 0.0800 i = 1 i = 2 b = 2 1 0 0 1 1 0 1 0 1 1 a = 0.0300 a = 0.0300 i = 1 i = 2 i = 3 i = 4 b = 2 1 0 0 1 1 0 1 0 1 1 3 a = 0 a = 0 b = 2 1 0 0 1 1 0 1 0 1 1 3

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

c = Columns 1 through 9 100.0000 50.0000 20.0000 10.0000 5.0000 2.0000 1.0000 0.5000 0.2500 Columns 10 through 12 0.1000 0.0500 0.0100 i = 1 i = 2 b = 1 a = 35.0100 a = 35.0100 i = 1 b = 1 0 a = 35.0100 a = 35.0100 i = 1 i = 2 b = 1 0 1 a = 15.0100 a = 15.0100 i = 1 i = 2 b = 1 0 1 1 a = 5.0100 a = 5.0100 i = 1 i = 2 b = 1 0 1 1 1 a = 0.0100 a = 0.0100 i = 1 b = 1 0 1 1 1 0 a = 0.0100 a = 0.0100 i = 1 b = 1 0 1 1 1 0 0 a = 0.0100 a = 0.0100 i = 1 b = 1 0 1 1 1 0 0 0 a = 0.0100 a = 0.0100 i = 1 b = 1 0 1 1 1 0 0 0 0 a = 0.0100 a = 0.0100 i = 1 b = 1 0 1 1 1 0 0 0 0 0 a = 0.0100 a = 0.0100 i = 1 b = 1 0 1 1 1 0 0 0 0 0 0 a = 0.0100 a = 0.0100 i = 1 i = 2 b = 1 0 1 1 1 0 0 0 0 0 0 1 a = 0 a = 0 b = 1 0 1 1 1 0 0 0 0 0 0 1

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

c = Columns 1 through 9 100.0000 50.0000 20.0000 10.0000 5.0000 2.0000 1.0000 0.5000 0.2500 Columns 10 through 12 0.1000 0.0500 0.0100 i = 1 i = 2 i = 3 i = 4 i = 5 i = 6 i = 7 i = 8 i = 9 i = 10 i = 11 i = 12 i = 13 i = 14 i = 15 i = 16 i = 17 i = 18 i = 19 i = 20 i = 21 i = 22 i = 23 i = 24 i = 25 i = 26 i = 27 i = 28 i = 29 i = 30 i = 31 i = 32 i = 33 i = 34 i = 35 i = 36 i = 37 i = 38 i = 39 i = 40 i = 41 i = 42 i = 43 i = 44 i = 45 i = 46 i = 47 i = 48 i = 49 i = 50 i = 51 i = 52 i = 53 i = 54 i = 55 i = 56 i = 57 i = 58 i = 59 i = 60 i = 61 i = 62 i = 63 i = 64 i = 65 i = 66 i = 67 i = 68 i = 69 i = 70 i = 71 i = 72 i = 73 i = 74 i = 75 i = 76 i = 77 i = 78 i = 79 i = 80 i = 81 i = 82 i = 83 i = 84 i = 85 i = 86 i = 87 i = 88 i = 89 i = 90 i = 91 i = 92 i = 93 i = 94 i = 95 i = 96 i = 97 i = 98 i = 99 i = 100 i = 101 b = 100 a = 35.9900 a = 35.9900 i = 1 b = 100 0 a = 35.9900 a = 35.9900 i = 1 i = 2 b = 100 0 1 a = 15.9900 a = 15.9900 i = 1 i = 2 b = 100 0 1 1 a = 5.9900 a = 5.9900 i = 1 i = 2 b = 100 0 1 1 1 a = 0.9900 a = 0.9900 i = 1 b = 100 0 1 1 1 0 a = 0.9900 a = 0.9900 i = 1 b = 100 0 1 1 1 0 0 a = 0.9900 a = 0.9900 i = 1 i = 2 b = 100 0 1 1 1 0 0 1 a = 0.4900 a = 0.4900 i = 1 i = 2 b = 100 0 1 1 1 0 0 1 1 a = 0.2400 a = 0.2400 i = 1 i = 2 i = 3 b = 100 0 1 1 1 0 0 1 1 2 a = 0.0400 a = 0.0400 i = 1 b = 100 0 1 1 1 0 0 1 1 2 0 a = 0.0400 a = 0.0400 i = 1 i = 2 i = 3 i = 4 i = 5 b = 100 0 1 1 1 0 0 1 1 2 0 4 a = 0 a = 0 b = 100 0 1 1 1 0 0 1 1 2 0 4