Cody

# Problem 2024. Triangle sequence

Solution 1882803

Submitted on 24 Jul 2019 by Thomas Werner
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)

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

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

a = 3 b = 4 c = 5 a = 4 b = 5 c = 6.4031 area = 41

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

a = 3 b = 4 c = 5 a = 4 b = 5 c = 6.4031 area = 41 a = 5 b = 6.4031 c = 8.1240 area = 66.0000

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

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