Cody

# Problem 2501. Whole Number Un-Concatenator

Solution 1698144

Submitted on 21 Dec 2018 by HH
• Size: 9
• This is the leading solution.
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=12345; dig=3; ns_correct=[123 45]; assert(isequal(uncat(n,dig),ns_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In uncat (line 2) In ScoringEngineTestPoint1 (line 4) In solutionTest (line 3)]

2   Pass
n=3141592; dig=1; ns_correct=[3 141592]; assert(isequal(uncat(n,dig),ns_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In uncat (line 2) In ScoringEngineTestPoint2 (line 4) In solutionTest (line 5)]

3   Pass
n=271828; dig=1; ns_correct=[2 71828]; assert(isequal(uncat(n,dig),ns_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In uncat (line 2) In ScoringEngineTestPoint3 (line 4) In solutionTest (line 7)]

4   Pass
n=1618033988; dig=6; ns_correct=[161803 3988]; assert(isequal(uncat(n,dig),ns_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In uncat (line 2) In ScoringEngineTestPoint4 (line 4) In solutionTest (line 9)]

5   Pass
n=112358132134; dig=10; ns_correct=[1123581321 34]; assert(isequal(uncat(n,dig),ns_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In uncat (line 2) In ScoringEngineTestPoint5 (line 4) In solutionTest (line 11)]