Cody

# Problem 2057. persistant sum

Solution 370374

Submitted on 15 Dec 2013 by Aritra Chatterjee
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
%% T1 n=[1259,1]; m=mod(n(1),n(2))+1; s=n(1)*(m+1)+m; assert(isequal(samasama(n),s))

ans = 2519

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

ans = 2519

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

ans = 2519

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

ans = 2519

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

ans = 2519

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

ans = 2519

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

ans = 2519

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

ans = 2519

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

ans = 2519

### Community Treasure Hunt

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

Start Hunting!