Cody

Solution 1475724

Submitted on 31 Mar 2018 by pion75
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)

i = 1 b = 4 c = 3 a = 5 area = 25

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

i = 1 2 b = 4 c = 3 a = 5 area = 25 b = 4 5 c = 3 4 a = 5.0000 6.4031 area = 41

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

i = 1 2 3 b = 4 c = 3 a = 5 area = 25 b = 4 5 c = 3 4 a = 5.0000 6.4031 area = 41 b = 4.0000 5.0000 6.4031 c = 3 4 5 a = 5.0000 6.4031 8.1240 area = 66.0000

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

i = Columns 1 through 30 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 Columns 31 through 50 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 b = 4 c = 3 a = 5 area = 25 b = 4 5 c = 3 4 a = 5.0000 6.4031 area = 41 b = 4.0000 5.0000 6.4031 c = 3 4 5 a = 5.0000 6.4031 8.1240 area = 66.0000 b = 4.0000 5.0000 6.4031 8.1240 c = 3.0000 4.0000 5.0000 6.4031 a = 5.0000 6.4031 8.1240 10.3441 area = 107.0000 b = 4.0000 5.0000 6.4031 8.1240 10.3441 c = 3.0000 4.0000 5.0000 6.4031 8.1240 a = 5.0000 6.4031 8.1240 10.3441 13.1529 area = 173.0000 b = 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 c = 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 a = 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 area = 280 b = 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 c = 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 a = 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 area = 453 b = 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 c = 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 a = 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 area = 733 b = 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 c = 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 a = 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 area = 1.1860e+03 b = 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 c = 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 a = 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 area = 1.9190e+03 b = 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 c = 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 a = 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 area = 3.1050e+03 b = 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 c = 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 a = 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 area = 5.0240e+03 b = 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 c = 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 a = 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 area = 8.1290e+03 b = 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 c = 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 a = 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 area = 1.3153e+04 b = 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 c = 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 a = 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 area = 2.1282e+04 b = 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 c = 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 a = 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 185.5667 area = 3.4435e+04 b = 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 185.5667 c = 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 a = 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 185.5667 236.0445 area = 5.5717e+04 b = 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 185.5667 236.0445 c = 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 185.5667 a = 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 185.5667 236.0445 300.2532 area = 90152 b = Columns 1 through 18 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 185.5667 236.0445 Column 19 300.2532 c = Columns 1 through 18 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 185.5667 Column 19 236.0445 a = Columns 1 through 18 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 185.5667 236.0445 300.2532 Column 19 381.9280 area = 1.4587e+05 b = Columns 1 through 18 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 185.5667 236.0445 Columns 19 through 20 300.2532 381.9280 c = Columns 1 through 18 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 185.5667 Columns 19 through 20 236.0445 300.2532 a = Columns 1 through 18 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 185.5667 236.0445 300.2532 Columns 19 through 20 381.9280 485.8199 area = 2.3602e+05 b = Columns 1 through 18 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 185.5667 236.0445 Columns 19 through 21 300.2532 381.9280 485.8199 c = Columns 1 through 18 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 185.5667 Columns 19 through 21 236.0445 300.2532 381.9280 a = Columns 1 through 18 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 185.5667 236.0445 300.2532 Columns 19 through 21 381.9280 485.8199 617.9725 area = 3.8189e+05 b = Columns 1 through 18 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 185.5667 236.0445 Columns 19 through 22 300.2532 381.9280 485.8199 617.9725 c = Columns 1 through 18 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 185.5667 Columns 19 through 22 236.0445 300.2532 381.9280 485.8199 a = Columns 1 through 18 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 185.5667 236.0445 300.2532 Columns 19 through 22 381.9280 485.8199 617.9725 786.0732 area = 6.1791e+05 b = Columns 1 through 18 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 185.5667 236.0445 Columns 19 through 23 300.2532 381.9280 485.8199 617.9725 786.0732 c = Columns 1 through 18 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 185.5667 Co...

Suggested Problems

More from this Author10