Cody

Solution 1771169

Submitted on 3 Apr 2019 by Militaru Andrei
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)

ip = 25 41 area = 25

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

ip = 25 41 area = 41

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

ip = 25 41 ip = 25 41 66

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

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

Suggested Problems

More from this Author10