# Project Euler #86: Cuboid route

# Project Euler #86: Cuboid route

+ 0 comments you can find my java solution here

+ 2 comments Solved this problem in F#. Insights:

- count only really distinct cuboids, for example the cuboids (A,B,C) (3,5,6) and (6,5,3) are considered equal.
- key insight for me was that there are only 1.5 million pythagorean triplets that correspond to a cuboid with max size 400.000
- if you use Euclid's formula (see for example https://en.wikipedia.org/wiki/Pythagorean_triple ) to generate pythagorean triplets and you are only interested in right triangles with maximum right side length M, then you can use 1.1*sqrt(M) as an upper bound for m.

If anybody is interested, I can write down my approach to solve this problem.

+ 0 comments . Would definitively advise to complete 75, and use roll distribution on the answer of 75. I dont think there is a way to solve it without generating pythagorean triplet correctly.

+ 2 comments Nice question! Im am curious if anyone managed to solve it with Python 3?

My Python 3 solution was just a bit too slow. on my personal comuter it took 15s to compute the table of solutions, which is more than the limit of 10s. However when I translated my solution to Java it finishes in just 0.2s which is much less than the limit of 4s.

Maybe the limit is a bit too low for Python?

+ 0 comments It may help to review OEIS A143715. The sequence is explained there and will also help check for correct calculations.

Sort 13 Discussions, By:

Please Login in order to post a comment