Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
s = '123454321';
i_correct = 3;
assert(isequal(running_product(s),i_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 running_product (line 2)
In ScoringEngineTestPoint1 (line 3)
In solutionTest (line 3)]
|
2 | Pass |
s = '5820974944592307816406286208998628034825342117067';
i_correct = 28;
assert(isequal(running_product(s),i_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 running_product (line 2)
In ScoringEngineTestPoint2 (line 3)
In solutionTest (line 5)]
|
3 | Pass |
s = '141592653589793238462643383279502884197169399399999';
i_correct = 47;
assert(isequal(running_product(s),i_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 running_product (line 2)
In ScoringEngineTestPoint3 (line 3)
In solutionTest (line 7)]
|
4 | Pass |
s = '7831652712019091456485669234603486104543266482133936072602';
i_correct = 21;
assert(isequal(running_product(s),i_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 running_product (line 2)
In ScoringEngineTestPoint4 (line 3)
In solutionTest (line 9)]
|
5 | Pass |
s = '70066063155881748815209209628292540917153643678925903600113305305488';
i_correct = 44;
assert(isequal(running_product(s),i_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 running_product (line 2)
In ScoringEngineTestPoint5 (line 3)
In solutionTest (line 11)]
|
6 | Pass |
s = '11111';
i_correct = 1;
assert(isequal(running_product(s),i_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 running_product (line 2)
In ScoringEngineTestPoint6 (line 3)
In solutionTest (line 13)]
|
Sort a list of complex numbers based on far they are from the origin.
4327 Solvers
626 Solvers
284 Solvers
Magic is simple (for beginners)
2756 Solvers
The Answer to Life, the Universe, and Everything
383 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!