Cody

Solution 1256278

Submitted on 24 Aug 2017 by Francis Naldo
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_correct = 1; assert(isequal(sum_all_digits(x),y_correct))

y = 0 a = 0 y = 0 x = 1 a = 0 y = 0 x = 1 a = 0 y = 0 x = 1 a = 0 y = 0 x = 1 a = 0 y = 0 x = 1 a = 0 y = 0 x = 1 a = 0 y = 0 x = 1 a = 0 y = 0 x = 1 a = 0 y = 0 x = 1 a = 0 y = 0 x = 1 a = 0 y = 0 x = 1 a = 0 y = 0 x = 1 a = 0 y = 0 x = 1 a = 0 y = 0 x = 1 a = 0 y = 0 x = 1 a = 1 y = 1 x = 0

2   Pass
x = 112; y_correct = 4; assert(isequal(sum_all_digits(x),y_correct))

y = 0 a = 0 y = 0 x = 112 a = 0 y = 0 x = 112 a = 0 y = 0 x = 112 a = 0 y = 0 x = 112 a = 0 y = 0 x = 112 a = 0 y = 0 x = 112 a = 0 y = 0 x = 112 a = 0 y = 0 x = 112 a = 0 y = 0 x = 112 a = 0 y = 0 x = 112 a = 0 y = 0 x = 112 a = 0 y = 0 x = 112 a = 0 y = 0 x = 112 a = 1 y = 1 x = 12 a = 1 y = 2 x = 2 a = 2 y = 4 x = 0

3   Pass
x = 18547; y_correct = 25; assert(isequal(sum_all_digits(x),y_correct))

y = 0 a = 0 y = 0 x = 18547 a = 0 y = 0 x = 18547 a = 0 y = 0 x = 18547 a = 0 y = 0 x = 18547 a = 0 y = 0 x = 18547 a = 0 y = 0 x = 18547 a = 0 y = 0 x = 18547 a = 0 y = 0 x = 18547 a = 0 y = 0 x = 18547 a = 0 y = 0 x = 18547 a = 0 y = 0 x = 18547 a = 1 y = 1 x = 8547 a = 8 y = 9 x = 547 a = 5 y = 14 x = 47 a = 4 y = 18 x = 7 a = 7 y = 25 x = 0

4   Pass
x = 147852369; y_correct = 45; assert(isequal(sum_all_digits(x),y_correct))

y = 0 a = 0 y = 0 x = 147852369 a = 0 y = 0 x = 147852369 a = 0 y = 0 x = 147852369 a = 0 y = 0 x = 147852369 a = 0 y = 0 x = 147852369 a = 0 y = 0 x = 147852369 a = 0 y = 0 x = 147852369 a = 1 y = 1 x = 47852369 a = 4 y = 5 x = 7852369 a = 7 y = 12 x = 852369 a = 8 y = 20 x = 52369 a = 5 y = 25 x = 2369 a = 2 y = 27 x = 369 a = 3 y = 30 x = 69 a = 6 y = 36 x = 9 a = 9 y = 45 x = 0

5   Pass
x = 753159; y_correct = 30; assert(isequal(sum_all_digits(x),y_correct))

y = 0 a = 0 y = 0 x = 753159 a = 0 y = 0 x = 753159 a = 0 y = 0 x = 753159 a = 0 y = 0 x = 753159 a = 0 y = 0 x = 753159 a = 0 y = 0 x = 753159 a = 0 y = 0 x = 753159 a = 0 y = 0 x = 753159 a = 0 y = 0 x = 753159 a = 0 y = 0 x = 753159 a = 7 y = 7 x = 53159 a = 5 y = 12 x = 3159 a = 3 y = 15 x = 159 a = 1 y = 16 x = 59 a = 5 y = 21 x = 9 a = 9 y = 30 x = 0

6   Pass
x = 1000245879653254; y_correct = 61; assert(isequal(sum_all_digits(x),y_correct))

y = 0 a = 1 y = 1 x = 2.4588e+11 a = 0 y = 1 x = 2.4588e+11 a = 0 y = 1 x = 2.4588e+11 a = 0 y = 1 x = 2.4588e+11 a = 2 y = 3 x = 4.5880e+10 a = 4 y = 7 x = 5.8797e+09 a = 5 y = 12 x = 879653254 a = 8 y = 20 x = 79653254 a = 7 y = 27 x = 9653254 a = 9 y = 36 x = 653254 a = 6 y = 42 x = 53254 a = 5 y = 47 x = 3254 a = 3 y = 50 x = 254 a = 2 y = 52 x = 54 a = 5 y = 57 x = 4 a = 4 y = 61 x = 0