Cody

Solution 990275

Submitted on 3 Oct 2016 by SirSteve26
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
assert(isequal(sum_of_digits(1),2))

b = 2 c = 2 y = 2

2   Pass
assert(isequal(sum_of_digits(3),8))

b = 8 c = 8 y = 8

3   Pass
assert(isequal(sum_of_digits(4),7))

b = 16 c = 16 y = 1 y = 7

4   Pass
assert(isequal(sum_of_digits(5),5))

b = 32 c = 32 y = 3 y = 5

5   Pass
assert(isequal(sum_of_digits(7),11))

b = 128 c = 128 y = 1 y = 3 y = 11

6   Pass
assert(isequal(sum_of_digits(9),8))

b = 512 c = 512 y = 5 y = 6 y = 8

7   Pass
assert(isequal(sum_of_digits(11),14))

b = 2048 c = 2048 y = 2 y = 2 y = 6 y = 14

8   Pass
assert(isequal(sum_of_digits(14),22))

b = 16384 c = 16384 y = 1 y = 7 y = 10 y = 18 y = 22

9   Pass
assert(isequal(sum_of_digits(16),25))

b = 65536 c = 65536 y = 6 y = 11 y = 16 y = 19 y = 25

10   Pass
assert(isequal(sum_of_digits(20),31))

b = 1048576 c = 1048576 y = 1 y = 1 y = 5 y = 13 y = 18 y = 25 y = 31

Suggested Problems

More from this Author2