Cody

# Problem 2057. persistant sum

Solution 910242

Submitted on 16 Jun 2016 by hubert andre
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
n=[1259,1]; m=mod(n(1),n(2))+1; s=n(1)*(m+1)+m; assert(isequal(samasama(n),s))

2   Pass
n=[839,2]; m=mod(n(1),n(2))+1; s=n(1)*(m+1)+m; assert(isequal(samasama(n),s))

3   Pass
n=[629,3]; m=mod(n(1),n(2))+1; s=n(1)*(m+1)+m; assert(isequal(samasama(n),s))

4   Pass
n=[503,4]; m=mod(n(1),n(2))+1; s=n(1)*(m+1)+m; assert(isequal(samasama(n),s))

5   Pass
n=[419,5]; m=mod(n(1),n(2))+1; s=n(1)*(m+1)+m; assert(isequal(samasama(n),s))

6   Pass
n=[359,6]; m=mod(n(1),n(2))+1; s=n(1)*(m+1)+m; assert(isequal(samasama(n),s))

7   Pass
n=[314,7]; m=mod(n(1),n(2))+1; s=n(1)*(m+1)+m; assert(isequal(samasama(n),s))

8   Pass
n=[279,8]; m=mod(n(1),n(2))+1; s=n(1)*(m+1)+m; assert(isequal(samasama(n),s))

9   Pass
n=[251,9]; m=mod(n(1),n(2))+1; s=n(1)*(m+1)+m; assert(isequal(samasama(n),s))

### Community Treasure Hunt

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

Start Hunting!