Cody

Problem 2463. Sum of Dividend Digits

Solution 856568

Submitted on 25 Mar 2016 by James
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
divisor = 35; rema = 26; y_correct = 4; assert(isequal(sum_dividend(divisor,rema),y_correct))

2   Pass
divisor = 126; rema = 85; y_correct = 13; assert(isequal(sum_dividend(divisor,rema),y_correct))

3   Pass
divisor = 1986; rema = 127; y_correct = 85; assert(isequal(sum_dividend(divisor,rema),y_correct))

4   Pass
divisor = 1987; rema = 552; y_correct = 80; assert(isequal(sum_dividend(divisor,rema),y_correct))

5   Pass
divisor = 126452417986541; rema = 9664658845861; y_correct = 197; assert(isequal(sum_dividend(divisor,rema),y_correct))

Suggested Problems

More from this Author6

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!