Cody

Solution 769025

Submitted on 30 Oct 2015 by Sam
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 = 1; area_correct = 25; tolerance = 1e-12; assert(abs(triangle_sequence(n)-area_correct)<tolerance)

2   Pass
%% n = 2; area_correct = 41; tolerance = 1e-12; assert(abs(triangle_sequence(n)-area_correct)<tolerance)

3   Pass
%% n = 3; area_correct = 66; tolerance = 1e-12; assert(abs(triangle_sequence(n)-area_correct)<tolerance)

x = 25 41 66

4   Pass
%% n = 50; area_correct = 439116598409; tolerance = 1e-3; assert(abs(triangle_sequence(n)-area_correct)<tolerance)

x = 25 41 66 x = 25 41 66 107 x = 25 41 66 107 173 x = 25 41 66 107 173 280 x = 25 41 66 107 173 280 453 x = 25 41 66 107 173 280 453 733 x = 25 41 66 107 173 280 453 733 1186 x = 25 41 66 107 173 280 453 733 1186 1919 x = 25 41 66 107 173 280 453 733 1186 1919 3105 x = 25 41 66 107 173 280 453 733 1186 1919 3105 5024 x = 25 41 66 107 173 280 453 733 1186 1919 3105 5024 8129 x = 25 41 66 107 173 280 453 733 1186 1919 3105 5024 8129 13153 x = Columns 1 through 14 25 41 66 107 173 280 453 733 1186 1919 3105 5024 8129 13153 Column 15 21282 x = Columns 1 through 14 25 41 66 107 173 280 453 733 1186 1919 3105 5024 8129 13153 Columns 15 through 16 21282 34435 x = Columns 1 through 14 25 41 66 107 173 280 453 733 1186 1919 3105 5024 8129 13153 Columns 15 through 17 21282 34435 55717 x = Columns 1 through 14 25 41 66 107 173 280 453 733 1186 1919 3105 5024 8129 13153 Columns 15 through 18 21282 34435 55717 90152 x = Columns 1 through 14 25 41 66 107 173 280 453 733 1186 1919 3105 5024 8129 13153 Columns 15 through 19 21282 34435 55717 90152 145869 x = Columns 1 through 14 25 41 66 107 173 280 453 733 1186 1919 3105 5024 8129 13153 Columns 15 through 20 21282 34435 55717 90152 145869 236021 x = Columns 1 through 14 25 41 66 107 173 280 453 733 1186 1919 3105 5024 8129 13153 Columns 15 through 21 21282 34435 55717 90152 145869 236021 381890 x = Columns 1 through 14 25 41 66 107 173 280 453 733 1186 1919 3105 5024 8129 13153 Columns 15 through 22 21282 34435 55717 90152 145869 236021 381890 617911 x = Columns 1 through 14 25 41 66 107 173 280 453 733 1186 1919 3105 5024 8129 13153 Columns 15 through 23 21282 34435 55717 90152 145869 236021 381890 617911 999801 x = Columns 1 through 14 25 41 66 107 173 280 453 733 1186 1919 3105 5024 8129 13153 Columns 15 through 24 21282 34435 55717 90152 145869 236021 381890 617911 999801 1617712 x = Columns 1 through 14 25 41 66 107 173 280 453 733 1186 1919 3105 5024 8129 13153 Columns 15 through 25 21282 34435 55717 90152 145869 236021 381890 617911 999801 1617712 2617513 x = Columns 1 through 14 25 41 66 107 173 280 453 733 1186 1919 3105 5024 8129 13153 Columns 15 through 26 21282 34435 55717 90152 145869 236021 381890 617911 999801 1617712 2617513 4235225 x = Columns 1 through 14 25 41 66 107 173 280 453 733 1186 1919 3105 5024 8129 13153 Columns 15 through 27 21282 34435 55717 90152 145869 236021 381890 617911 999801 1617712 2617513 4235225 6852738 x = Columns 1 through 14 25 41 66 107 173 280 453 733 1186 1919 3105 5024 8129 13153 Columns 15 through 28 21282 34435 55717 90152 145869 236021 381890 617911 999801 1617712 2617513 4235225 6852738 11087963 x = Columns 1 through 14 25 41 66 107 173 280 453 733 1186 1919 3105 5024 8129 13153 Columns 15 through 28 21282 34435 55717 90152 145869 236021 381890 617911 999801 1617712 2617513 4235225 6852738 11087963 Column 29 17940701 x = Columns 1 through 14 25 41 66 107 173 280 453 733 1186 1919 3105 5024 8129 13153 Columns 15 through 28 21282 34435 55717 90152 145869 236021 381890 617911 999801 1617712 2617513 4235225 6852738 11087963 Columns 29 through 30 17940701 29028664 x = Columns 1 through 14 25 41 66 107 173 280 453 733 1186 1919 3105 5024 8129 13153 Columns 15 through 28 21282 34435 55717 90152 145869 236021 381890 617911 999801 1617712 2617513 4235225 6852738 11087963 Columns 29 through 31 17940701 29028664 46969365 x = Columns 1 through 14 25 41 66 107 173 280 453 733 1186 1919 3105 5024 8129 13153 Columns 15 through 28 21282 34435 55717 90152 145869 236021 381890 617911 999801 1617712 2617513 4235225 6852738 11087963 Columns 29 through 32 17940701 29028664 46969365 75998029 x = Columns 1 through 14 25 41 66 107 173 280 453 733 1186 1919 3105 5024 8129 13153 Columns 15 through 28 21282 34435 55717 90152 145869 236021 381890 617911 999801 1617712 2617513 4235225 6852738 11087963 Columns 29 through 33 17940701 29028664 46969365 75998029 122967394 x = Columns 1 through 14 25 41 66 107 173 280 453 733 1186 1919 3105 5024 8129 13153 Columns 15 through 28 21282 34435 55717 90152 145869 236021 381890 617911 999801 1617712 2617513 4235225 6852738 11087963 Columns 29 through 34 17940701 29028664 46969365 75998029 122967394 198965423 x = Columns 1 through 14 25 41 66 107 173 280 453 733 1186 1919 3105 5024 8129 13153 Columns 15 through 28 21282 34435 55717 90152 145869 236021 381890 617911 999801 1617712 2617513 4235225 6852738 11087963 Columns 29 through 35 17940701 29028664 46969365 75998029 122967394 198965423 321932817 x = Columns 1 through 14 25 41 66 107 173 280 453 733 1186 1919 3105 5024 8129 13153 Columns 15 through 28 21282 34435 55717 90152 145869 236021 381890 617911 999801 1617712 2617513 4235225 6852738 11087963 Columns 29 through 36 17940701 29028664 46969365 75998029 122967394 198965423 321932817 520898240 x = Columns 1 through 14 25 41 66 107 173 280 453 733 1186 1919 3105 5024 8129 13153 Columns 15 through 28 21282 34435 55717 90152 145869 236021 381890 617911 999801 1617712 2617513 4235225 6852738 11087963 Columns 29 through 37 17940701 29028664 46969365 75998029 122967394 198965423 321932817 520898240 842831057 x = 1.0e+09 * Columns 1 through 17 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.0001 Columns 18 through 34 0.0001 0.0001 0.0002 0.0004 0.0006 0.0010 0.0016 0.0026 ...