Cody

Solution 1547952

Submitted on 4 Jun 2018 by reema ziada
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 = [] a = 257.6800 i = 0 i = 1 a = 157.6800 i = 2 a = 57.6800 b = 2 i = 0 i = 1 a = 7.6800 b = 2 1 i = 0 b = 2 1 0 i = 0 b = 2 1 0 0 i = 0 i = 1 a = 2.6800 b = 2 1 0 0 1 i = 0 i = 1 a = 0.6800 b = 2 1 0 0 1 1 i = 0 b = 2 1 0 0 1 1 0 i = 0 i = 1 a = 0.1800 b = 2 1 0 0 1 1 0 1 i = 0 b = 2 1 0 0 1 1 0 1 0 i = 0 i = 1 a = 0.0800 b = 2 1 0 0 1 1 0 1 0 1 i = 0 i = 1 a = 0.0300 b = 2 1 0 0 1 1 0 1 0 1 1 i = 0 i = 1 a = 0.0200 i = 2 a = 0.0100 i = 3 a = 1.0000e-06 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(:)))

b = [] a = 135.0100 i = 0 i = 1 a = 35.0100 b = 1 i = 0 b = 1 0 i = 0 i = 1 a = 15.0100 b = 1 0 1 i = 0 i = 1 a = 5.0100 b = 1 0 1 1 i = 0 i = 1 a = 0.0100 b = 1 0 1 1 1 i = 0 b = 1 0 1 1 1 0 i = 0 b = 1 0 1 1 1 0 0 i = 0 b = 1 0 1 1 1 0 0 0 i = 0 b = 1 0 1 1 1 0 0 0 0 i = 0 b = 1 0 1 1 1 0 0 0 0 0 i = 0 b = 1 0 1 1 1 0 0 0 0 0 0 i = 0 i = 1 a = 1.0000e-06 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(:)))

b = [] a = 1.0036e+04 i = 0 i = 1 a = 9.9360e+03 i = 2 a = 9.8360e+03 i = 3 a = 9.7360e+03 i = 4 a = 9.6360e+03 i = 5 a = 9.5360e+03 i = 6 a = 9.4360e+03 i = 7 a = 9.3360e+03 i = 8 a = 9.2360e+03 i = 9 a = 9.1360e+03 i = 10 a = 9.0360e+03 i = 11 a = 8.9360e+03 i = 12 a = 8.8360e+03 i = 13 a = 8.7360e+03 i = 14 a = 8.6360e+03 i = 15 a = 8.5360e+03 i = 16 a = 8.4360e+03 i = 17 a = 8.3360e+03 i = 18 a = 8.2360e+03 i = 19 a = 8.1360e+03 i = 20 a = 8.0360e+03 i = 21 a = 7.9360e+03 i = 22 a = 7.8360e+03 i = 23 a = 7.7360e+03 i = 24 a = 7.6360e+03 i = 25 a = 7.5360e+03 i = 26 a = 7.4360e+03 i = 27 a = 7.3360e+03 i = 28 a = 7.2360e+03 i = 29 a = 7.1360e+03 i = 30 a = 7.0360e+03 i = 31 a = 6.9360e+03 i = 32 a = 6.8360e+03 i = 33 a = 6.7360e+03 i = 34 a = 6.6360e+03 i = 35 a = 6.5360e+03 i = 36 a = 6.4360e+03 i = 37 a = 6.3360e+03 i = 38 a = 6.2360e+03 i = 39 a = 6.1360e+03 i = 40 a = 6.0360e+03 i = 41 a = 5.9360e+03 i = 42 a = 5.8360e+03 i = 43 a = 5.7360e+03 i = 44 a = 5.6360e+03 i = 45 a = 5.5360e+03 i = 46 a = 5.4360e+03 i = 47 a = 5.3360e+03 i = 48 a = 5.2360e+03 i = 49 a = 5.1360e+03 i = 50 a = 5.0360e+03 i = 51 a = 4.9360e+03 i = 52 a = 4.8360e+03 i = 53 a = 4.7360e+03 i = 54 a = 4.6360e+03 i = 55 a = 4.5360e+03 i = 56 a = 4.4360e+03 i = 57 a = 4.3360e+03 i = 58 a = 4.2360e+03 i = 59 a = 4.1360e+03 i = 60 a = 4.0360e+03 i = 61 a = 3.9360e+03 i = 62 a = 3.8360e+03 i = 63 a = 3.7360e+03 i = 64 a = 3.6360e+03 i = 65 a = 3.5360e+03 i = 66 a = 3.4360e+03 i = 67 a = 3.3360e+03 i = 68 a = 3.2360e+03 i = 69 a = 3.1360e+03 i = 70 a = 3.0360e+03 i = 71 a = 2.9360e+03 i = 72 a = 2.8360e+03 i = 73 a = 2.7360e+03 i = 74 a = 2.6360e+03 i = 75 a = 2.5360e+03 i = 76 a = 2.4360e+03 i = 77 a = 2.3360e+03 i = 78 a = 2.2360e+03 i = 79 a = 2.1360e+03 i = 80 a = 2.0360e+03 i = 81 a = 1.9360e+03 i = 82 a = 1.8360e+03 i = 83 a = 1.7360e+03 i = 84 a = 1.6360e+03 i = 85 a = 1.5360e+03 i = 86 a = 1.4360e+03 i = 87 a = 1.3360e+03 i = 88 a = 1.2360e+03 i = 89 a = 1.1360e+03 i = 90 a = 1.0360e+03 i = 91 a = 935.9900 i = 92 a = 835.9900 i = 93 a = 735.9900 i = 94 a = 635.9900 i = 95 a = 535.9900 i = 96 a = 435.9900 i = 97 a = 335.9900 i = 98 a = 235.9900 i = 99 a = 135.9900 i = 100 a = 35.9900 b = 100 i = 0 b = 100 0 i = 0 i = 1 a = 15.9900 b = 100 0 1 i = 0 i = 1 a = 5.9900 b = 100 0 1 1 i = 0 i = 1 a = 0.9900 b = 100 0 1 1 1 i = 0 b = 100 0 1 1 1 0 i = 0 b = 100 0 1 1 1 0 0 i = 0 i = 1 a = 0.4900 b = 100 0 1 1 1 0 0 1 i = 0 i = 1 a = 0.2400 b = 100 0 1 1 1 0 0 1 1 i = 0 i = 1 a = 0.1400 i = 2 a = 0.0400 b = 100 0 1 1 1 0 0 1 1 2 i = 0 b = 100 0 1 1 1 0 0 1 1 2 0 i = 0 i = 1 a = 0.0300 i = 2 a = 0.0200 i = 3 a = 0.0100 i = 4 a = 1.0000e-06 b = 100 0 1 1 1 0 0 1 1 2 0 4