Cody

# Problem 1103. Right Triangle Side Lengths (Inspired by Project Euler Problem 39)

Solution 3860098

Submitted on 26 Nov 2020
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   Fail
assert(isequal(right_triangle_sides(240),{ [15 112 113] [40 96 104] [48 90 102] [60 80 100] }))

sides = 60 48 40 15 80 90 96 112 100 102 104 113 d = 15 112 113 40 96 104 48 90 102 60 80 100

Assertion failed.

2   Fail
assert(isequal(right_triangle_sides(240),{ [15 112 113] [40 96 104] [48 90 102] [60 80 100] }))

sides = 60 48 40 15 80 90 96 112 100 102 104 113 d = 15 112 113 40 96 104 48 90 102 60 80 100

Assertion failed.

3   Fail
assert(isequal(right_triangle_sides(418),{ [57 176 185] }))

sides = 57 176 185 d = 57 176 185

Assertion failed.

4   Fail
assert(isequal(right_triangle_sides(490),{ [140 147 203] }))

sides = 140 147 203 d = 140 147 203

Assertion failed.

5   Fail
assert(isequal(right_triangle_sides(112),{ [14 48 50] }))

sides = 14 48 50 d = 14 48 50

Assertion failed.

6   Fail
assert(isequal(right_triangle_sides(390),{ [52 165 173] [65 156 169] }))

sides = 65 52 156 165 169 173 d = 52 165 173 65 156 169

Assertion failed.

7   Fail
assert(isequal(right_triangle_sides(132),{ [11 60 61] [33 44 55] }))

sides = 33 11 44 60 55 61 d = 11 60 61 33 44 55

Assertion failed.

8   Fail
assert(isequal(right_triangle_sides(576),{ [64 252 260] [144 192 240] }))

sides = 144 64 192 252 240 260 d = 64 252 260 144 192 240

Assertion failed.

9   Fail
assert(isequal(right_triangle_sides(60),{ [10 24 26] [15 20 25] }))

sides = 15 10 20 24 25 26 d = 10 24 26 15 20 25

Assertion failed.

10   Fail
assert(isequal(right_triangle_sides(650),{ [25 312 313] }))

sides = 25 312 313 d = 25 312 313

Assertion failed.

11   Fail
assert(isequal(right_triangle_sides(732),{ [183 244 305] }))

sides = 183 244 305 d = 183 244 305

Assertion failed.

12   Fail
assert(isequal(right_triangle_sides(648),{ [162 216 270] }))

sides = 162 216 270 d = 162 216 270

Assertion failed.

13   Fail
assert(isequal(right_triangle_sides(930),{ [155 372 403] }))

sides = 155 372 403 d = 155 372 403

Assertion failed.

14   Fail
assert(isequal(right_triangle_sides(876),{ [219 292 365] }))

sides = 219 292 365 d = 219 292 365

Assertion failed.

15   Fail
assert(isequal(right_triangle_sides(588),{ [84 245 259] [147 196 245] }))

sides = 147 84 196 245 245 259 d = 84 245 259 147 196 245

Assertion failed.

16   Fail
assert(isequal(right_triangle_sides(208),{ [39 80 89] }))

sides = 39 80 89 d = 39 80 89

Assertion failed.

17   Fail
assert(isequal(right_triangle_sides(228),{ [57 76 95] }))

sides = 57 76 95 d = 57 76 95

Assertion failed.

18   Fail
assert(isequal(right_triangle_sides(312),{ [24 143 145] [78 104 130] }))

sides = 78 24 104 143 130 145 d = 24 143 145 78 104 130

Assertion failed.

19   Fail
assert(isequal(right_triangle_sides(924),{ [42 440 442] [77 420 427] [132 385 407] [198 336 390] [231 308 385] }))

sides = 231 198 132 77 42 308 336 385 420 440 385 390 407 427 442 d = 42 440 442 77 420 427 132 385 407 198 336 390 231 308 385

Assertion failed.

20   Fail
assert(isequal(right_triangle_sides(980),{ [280 294 406] }))

sides = 280 294 406 d = 280 294 406

Assertion failed.

21   Fail
assert(isequal(right_triangle_sides(112),{ [14 48 50] }))

sides = 14 48 50 d = 14 48 50

Assertion failed.

22   Fail
assert(isequal(right_triangle_sides(30),{ [5 12 13] }))

sides = 5 12 13 d = 5 12 13

Assertion failed.

23   Fail
assert(isequal(right_triangle_sides(680),{ [102 280 298] [136 255 289] }))

sides = 136 102 255 280 289 298 d = 102 280 298 136 255 289

Assertion failed.

24   Fail
assert(isequal(right_triangle_sides(396),{ [33 180 183] [72 154 170] [99 132 165] }))

sides = 99 72 33 132 154 180 165 170 183 d = 33 180 183 72 154 170 99 132 165

Assertion failed.

25   Fail
assert(isequal(right_triangle_sides(988),{ [266 312 410] }))

sides = 266 312 410 d = 266 312 410

Assertion failed.

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!