Cody

Solution 495432

Submitted on 3 Sep 2014 by goc3
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
%% x = [1]; y = [1]; assert(isequal(individualNumSum(x),y))

b = 1 1 y = 1

2   Pass
%% x = [103]; y = [4]; assert(isequal(individualNumSum(x),y))

b = 103 b = 4 1 y = 4

3   Pass
%% x=[189 22 39 88 55 485 769 215 3685 4589]; y = [9 4 3 7 1 8 4 8 4 8]; assert(isequal(individualNumSum(x),y))

b = 189 b = 18 b = 9 1 y = 9 b = 22 b = 4 2 y = 9 4 b = 39 b = 12 b = 3 3 y = 9 4 3 b = 88 b = 16 b = 7 4 y = 9 4 3 7 b = 55 b = 10 b = 1 5 y = 9 4 3 7 1 b = 485 b = 17 b = 8 6 y = 9 4 3 7 1 8 b = 769 b = 22 b = 4 7 y = 9 4 3 7 1 8 4 b = 215 b = 8 8 y = 9 4 3 7 1 8 4 8 b = 3685 b = 22 b = 4 9 y = 9 4 3 7 1 8 4 8 4 b = 4589 b = 26 b = 8 10 y = 9 4 3 7 1 8 4 8 4 8

4   Pass
%% x=[1111 2222 3333 4444 5555 6666 7777 8888 9999 0]; y = [4 8 3 7 2 6 1 5 9 0]; assert(isequal(individualNumSum(x),y))

b = 1111 b = 4 1 y = 4 b = 2222 b = 8 2 y = 4 8 b = 3333 b = 12 b = 3 3 y = 4 8 3 b = 4444 b = 16 b = 7 4 y = 4 8 3 7 b = 5555 b = 20 b = 2 5 y = 4 8 3 7 2 b = 6666 b = 24 b = 6 6 y = 4 8 3 7 2 6 b = 7777 b = 28 b = 10 b = 1 7 y = 4 8 3 7 2 6 1 b = 8888 b = 32 b = 5 8 y = 4 8 3 7 2 6 1 5 b = 9999 b = 36 b = 9 9 y = 4 8 3 7 2 6 1 5 9 b = 0 10 y = 4 8 3 7 2 6 1 5 9 0

5   Pass
%% x=[111 222 333 444 555 666 777 888 999 0]; y = [3 6 9 3 6 9 3 6 9 0]; assert(isequal(individualNumSum(x),y))

b = 111 b = 3 1 y = 3 b = 222 b = 6 2 y = 3 6 b = 333 b = 9 3 y = 3 6 9 b = 444 b = 12 b = 3 4 y = 3 6 9 3 b = 555 b = 15 b = 6 5 y = 3 6 9 3 6 b = 666 b = 18 b = 9 6 y = 3 6 9 3 6 9 b = 777 b = 21 b = 3 7 y = 3 6 9 3 6 9 3 b = 888 b = 24 b = 6 8 y = 3 6 9 3 6 9 3 6 b = 999 b = 27 b = 9 9 y = 3 6 9 3 6 9 3 6 9 b = 0 10 y = 3 6 9 3 6 9 3 6 9 0

6   Pass
%% x=[11 3]; y = [2 3]; assert(isequal(individualNumSum(x),y))

b = 11 b = 2 1 y = 2 b = 3 2 y = 2 3