Cody

Solution 2124747

Submitted on 11 Feb 2020 by Jiahang Li
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
x =4000000 y_correct = 4613732; assert(isequal(euler002(x),y_correct))

x = 4000000 f = 1.0e+10 * Columns 1 through 18 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 Columns 19 through 36 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0001 0.0001 0.0001 0.0002 0.0004 0.0006 0.0009 0.0015 Columns 37 through 50 0.0024 0.0039 0.0063 0.0102 0.0166 0.0268 0.0433 0.0701 0.1135 0.1836 0.2971 0.4808 0.7779 1.2586 ans = 33 ans = 4613732

2   Pass
x =97455000 y_correct = 82790070; assert(isequal(euler002(x),y_correct))

x = 97455000 f = 1.0e+10 * Columns 1 through 18 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 Columns 19 through 36 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0001 0.0001 0.0001 0.0002 0.0004 0.0006 0.0009 0.0015 Columns 37 through 50 0.0024 0.0039 0.0063 0.0102 0.0166 0.0268 0.0433 0.0701 0.1135 0.1836 0.2971 0.4808 0.7779 1.2586 ans = 39 ans = 82790070

3   Pass
x =597455000 y_correct = 350704366; assert(isequal(euler002(x),y_correct))

x = 597455000 f = 1.0e+10 * Columns 1 through 18 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 Columns 19 through 36 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0001 0.0001 0.0001 0.0002 0.0004 0.0006 0.0009 0.0015 Columns 37 through 50 0.0024 0.0039 0.0063 0.0102 0.0166 0.0268 0.0433 0.0701 0.1135 0.1836 0.2971 0.4808 0.7779 1.2586 ans = 43 ans = 350704366

4   Pass
x =666576 y_correct = 257114; assert(isequal(euler002(x),y_correct))

x = 666576 f = 1.0e+10 * Columns 1 through 18 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 Columns 19 through 36 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0001 0.0001 0.0001 0.0002 0.0004 0.0006 0.0009 0.0015 Columns 37 through 50 0.0024 0.0039 0.0063 0.0102 0.0166 0.0268 0.0433 0.0701 0.1135 0.1836 0.2971 0.4808 0.7779 1.2586 ans = 29 ans = 257114