Cody

Solution 945064

Submitted on 29 Aug 2016 by steph26
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)

a = 3 4 b = 4 5 c = 5.0000 6.4031

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

a = 3 4 b = 4 5 c = 5.0000 6.4031 a = 3 4 5 b = 4.0000 5.0000 6.4031 c = 5.0000 6.4031 8.1240

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

a = 3 4 b = 4 5 c = 5.0000 6.4031 a = 3 4 5 b = 4.0000 5.0000 6.4031 c = 5.0000 6.4031 8.1240 a = 3.0000 4.0000 5.0000 6.4031 b = 4.0000 5.0000 6.4031 8.1240 c = 5.0000 6.4031 8.1240 10.3441 a = 3.0000 4.0000 5.0000 6.4031 8.1240 b = 4.0000 5.0000 6.4031 8.1240 10.3441 c = 5.0000 6.4031 8.1240 10.3441 13.1529 a = 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 b = 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 c = 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 a = 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 b = 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 c = 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 a = 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 b = 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 c = 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 a = 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 b = 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 c = 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 a = Columns 1 through 9 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 Column 10 27.0740 b = Columns 1 through 9 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 Column 10 34.4384 c = Columns 1 through 9 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 Column 10 43.8064 a = Columns 1 through 9 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 Columns 10 through 11 27.0740 34.4384 b = Columns 1 through 9 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 Columns 10 through 11 34.4384 43.8064 c = Columns 1 through 9 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 Columns 10 through 11 43.8064 55.7225 a = Columns 1 through 9 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 Columns 10 through 12 27.0740 34.4384 43.8064 b = Columns 1 through 9 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 Columns 10 through 12 34.4384 43.8064 55.7225 c = Columns 1 through 9 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 Columns 10 through 12 43.8064 55.7225 70.8802 a = Columns 1 through 9 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 Columns 10 through 13 27.0740 34.4384 43.8064 55.7225 b = Columns 1 through 9 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 Columns 10 through 13 34.4384 43.8064 55.7225 70.8802 c = Columns 1 through 9 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 Columns 10 through 13 43.8064 55.7225 70.8802 90.1610 a = Columns 1 through 9 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 Columns 10 through 14 27.0740 34.4384 43.8064 55.7225 70.8802 b = Columns 1 through 9 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 Columns 10 through 14 34.4384 43.8064 55.7225 70.8802 90.1610 c = Columns 1 through 9 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 Columns 10 through 14 43.8064 55.7225 70.8802 90.1610 114.6865 a = Columns 1 through 9 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 Columns 10 through 15 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 b = Columns 1 through 9 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 Columns 10 through 15 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 c = Columns 1 through 9 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 Columns 10 through 15 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 a = Columns 1 through 9 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 Columns 10 through 16 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 b = Columns 1 through 9 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 Columns 10 through 16 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 c = Columns 1 through 9 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 Columns 10 through 16 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 185.5667 a = Columns 1 through 9 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 Columns 10 through 17 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 b = Columns 1 through 9 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 Columns 10 through 17 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 185.5667 c = Columns 1 through 9 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 Columns 10 through 17 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 185.5667 236.0445 a = Columns 1 through 9 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 Columns 10 through 18 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 185.5667 b = Columns 1 through 9 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 Columns 10 through 18 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 185.5667 236.0445 c = Columns 1 through 9 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 Columns 10 through 18 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 185.5667 236.0445 300.2532 a = Columns 1 through 9 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 Columns 10 through 18 27.0740 34.4384 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 185.5667 Column 19 236.0445 b = Columns 1 through 9 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 Columns 10 through 18 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 9 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 Columns 10 through 18 43.8064 55.7225 70.8802 90.1610 114.6865 145.8835 185.5667 236.0445 300.2532 Column 19 381.9280 a = Columns 1 through 9 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 Columns 10 through 18 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 b = Columns 1 through 9 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 Columns 10 through 18 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 9 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 Columns 10 through 18 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 a = Columns 1 through 9 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 Columns 10 through 18 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 b = Columns 1 through 9 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 Columns 10 through 18 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 9 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 34.4384 Columns 10 through 18 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 a = Columns 1 through 9 3.0000 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 Columns 10 through 18 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 b = Columns 1 through 9 4.0000 5.0000 6.4031 8.1240 10.3441 13.1529 16.7332 21.2838 27.0740 Columns 10 through 18 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 9 5.0000 6.4031 8.1240 10.344...

Suggested Problems

More from this Author10