Cody

Solution 1919539

Submitted on 2 Sep 2019 by Pavel
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)

s = 0 1 1 ans = 25

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

s = 0 1 1 s = 0 1 1 2 ans = 41

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

s = 0 1 1 s = 0 1 1 2 s = 0 1 1 2 3 ans = 66

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

s = 0 1 1 s = 0 1 1 2 s = 0 1 1 2 3 s = 0 1 1 2 3 5 s = 0 1 1 2 3 5 8 s = 0 1 1 2 3 5 8 13 s = 0 1 1 2 3 5 8 13 21 s = 0 1 1 2 3 5 8 13 21 34 s = 0 1 1 2 3 5 8 13 21 34 55 s = 0 1 1 2 3 5 8 13 21 34 55 89 s = 0 1 1 2 3 5 8 13 21 34 55 89 144 s = 0 1 1 2 3 5 8 13 21 34 55 89 144 233 s = 0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 s = 0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 s = 0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 s = Columns 1 through 14 0 1 1 2 3 5 8 13 21 34 55 89 144 233 Columns 15 through 18 377 610 987 1597 s = Columns 1 through 14 0 1 1 2 3 5 8 13 21 34 55 89 144 233 Columns 15 through 19 377 610 987 1597 2584 s = Columns 1 through 14 0 1 1 2 3 5 8 13 21 34 55 89 144 233 Columns 15 through 20 377 610 987 1597 2584 4181 s = Columns 1 through 14 0 1 1 2 3 5 8 13 21 34 55 89 144 233 Columns 15 through 21 377 610 987 1597 2584 4181 6765 s = Columns 1 through 14 0 1 1 2 3 5 8 13 21 34 55 89 144 233 Columns 15 through 22 377 610 987 1597 2584 4181 6765 10946 s = Columns 1 through 14 0 1 1 2 3 5 8 13 21 34 55 89 144 233 Columns 15 through 23 377 610 987 1597 2584 4181 6765 10946 17711 s = Columns 1 through 14 0 1 1 2 3 5 8 13 21 34 55 89 144 233 Columns 15 through 24 377 610 987 1597 2584 4181 6765 10946 17711 28657 s = Columns 1 through 14 0 1 1 2 3 5 8 13 21 34 55 89 144 233 Columns 15 through 25 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 s = Columns 1 through 14 0 1 1 2 3 5 8 13 21 34 55 89 144 233 Columns 15 through 26 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 s = Columns 1 through 14 0 1 1 2 3 5 8 13 21 34 55 89 144 233 Columns 15 through 27 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 s = Columns 1 through 14 0 1 1 2 3 5 8 13 21 34 55 89 144 233 Columns 15 through 28 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 s = Columns 1 through 14 0 1 1 2 3 5 8 13 21 34 55 89 144 233 Columns 15 through 28 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 Column 29 317811 s = Columns 1 through 14 0 1 1 2 3 5 8 13 21 34 55 89 144 233 Columns 15 through 28 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 Columns 29 through 30 317811 514229 s = Columns 1 through 14 0 1 1 2 3 5 8 13 21 34 55 89 144 233 Columns 15 through 28 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 Columns 29 through 31 317811 514229 832040 s = Columns 1 through 14 0 1 1 2 3 5 8 13 21 34 55 89 144 233 Columns 15 through 28 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 Columns 29 through 32 317811 514229 832040 1346269 s = Columns 1 through 14 0 1 1 2 3 5 8 13 21 34 55 89 144 233 Columns 15 through 28 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 Columns 29 through 33 317811 514229 832040 1346269 2178309 s = Columns 1 through 14 0 1 1 2 3 5 8 13 21 34 55 89 144 233 Columns 15 through 28 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 Columns 29 through 34 317811 514229 832040 1346269 2178309 3524578 s = Columns 1 through 14 0 1 1 2 3 5 8 13 21 34 55 89 144 233 Columns 15 through 28 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 Columns 29 through 35 317811 514229 832040 1346269 2178309 3524578 5702887 s = Columns 1 through 14 0 1 1 2 3 5 8 13 21 34 55 89 144 233 Columns 15 through 28 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 Columns 29 through 36 317811 514229 832040 1346269 2178309 3524578 5702887 9227465 s = Columns 1 through 14 0 1 1 2 3 5 8 13 21 34 55 89 144 233 Columns 15 through 28 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 Columns 29 through 37 317811 514229 832040 1346269 2178309 3524578 5702887 9227465 14930352 s = Columns 1 through 14 0 1 1 2 3 5 8 13 21 34 55 89 144 233 Columns 15 through 28 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 Columns 29 through 38 317811 514229 832040 1346269 2178309 3524578 5702887 9227465 14930352 24157817 s = Columns 1 through 14 0 1 1 2 3 5 8 13 21 34 55 89 144 233 Columns 15 through 28 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 Columns 29 through 39 31...

Suggested Problems

More from this Author10