Cody

Solution 1810052

Submitted on 8 May 2019 by Be Matlabi
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)

area = 25 a = 4 5

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

area = 25 a = 4 5 area = 41 a = 5.0000 6.4031

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

area = 25 a = 4 5 area = 41 a = 5.0000 6.4031 area = 66 a = 6.4031 8.1240

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

area = 25 a = 4 5 area = 41 a = 5.0000 6.4031 area = 66 a = 6.4031 8.1240 area = 107.0000 a = 8.1240 10.3441 area = 173.0000 a = 10.3441 13.1529 area = 280.0000 a = 13.1529 16.7332 area = 453.0000 a = 16.7332 21.2838 area = 733 a = 21.2838 27.0740 area = 1186 a = 27.0740 34.4384 area = 1.9190e+03 a = 34.4384 43.8064 area = 3.1050e+03 a = 43.8064 55.7225 area = 5.0240e+03 a = 55.7225 70.8802 area = 8.1290e+03 a = 70.8802 90.1610 area = 1.3153e+04 a = 90.1610 114.6865 area = 2.1282e+04 a = 114.6865 145.8835 area = 3.4435e+04 a = 145.8835 185.5667 area = 5.5717e+04 a = 185.5667 236.0445 area = 9.0152e+04 a = 236.0445 300.2532 area = 145869 a = 300.2532 381.9280 area = 2.3602e+05 a = 381.9280 485.8199 area = 3.8189e+05 a = 485.8199 617.9725 area = 6.1791e+05 a = 617.9725 786.0732 area = 9.9980e+05 a = 786.0732 999.9005 area = 1.6177e+06 a = 1.0e+03 * 0.9999 1.2719 area = 2.6175e+06 a = 1.0e+03 * 1.2719 1.6179 area = 4.2352e+06 a = 1.0e+03 * 1.6179 2.0580 area = 6.8527e+06 a = 1.0e+03 * 2.0580 2.6178 area = 1.1088e+07 a = 1.0e+03 * 2.6178 3.3299 area = 1.7941e+07 a = 1.0e+03 * 3.3299 4.2356 area = 2.9029e+07 a = 1.0e+03 * 4.2356 5.3878 area = 4.6969e+07 a = 1.0e+03 * 5.3878 6.8534 area = 7.5998e+07 a = 1.0e+03 * 6.8534 8.7177 area = 1.2297e+08 a = 1.0e+04 * 0.8718 1.1089 area = 1.9897e+08 a = 1.0e+04 * 1.1089 1.4106 area = 3.2193e+08 a = 1.0e+04 * 1.4106 1.7942 area = 5.2090e+08 a = 1.0e+04 * 1.7942 2.2823 area = 8.4283e+08 a = 1.0e+04 * 2.2823 2.9032 area = 1.3637e+09 a = 1.0e+04 * 2.9032 3.6929 area = 2.2066e+09 a = 1.0e+04 * 3.6929 4.6974 area = 3.5703e+09 a = 1.0e+04 * 4.6974 5.9752 area = 5.7769e+09 a = 1.0e+04 * 5.9752 7.6006 area = 9.3471e+09 a = 1.0e+04 * 7.6006 9.6681 area = 1.5124e+10 a = 1.0e+05 * 0.9668 1.2298 area = 2.4471e+10 a = 1.0e+05 * 1.2298 1.5643 area = 3.9595e+10 a = 1.0e+05 * 1.5643 1.9899 area = 6.4066e+10 a = 1.0e+05 * 1.9899 2.5311 area = 1.0366e+11 a = 1.0e+05 * 2.5311 3.2196 area = 1.6773e+11 a = 1.0e+05 * 3.2196 4.0955 area = 2.7139e+11 a = 1.0e+05 * 4.0955 5.2095 area = 4.3912e+11 a = 1.0e+05 * 5.2095 6.6266

Suggested Problems

More from this Author10