We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
the first step of my algorithm is to generate all the primitive triples and their multiples with perimeter less or equal 5*10^6 using Euclid's formula, and in first instance I assumed that m<=1200 was sufficient to generate al the triples (I've approximated n=m, so max perimeter was near 4*1200^2) but this way I was loosing some triangles generated by higher m...
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #75: Singular integer right triangles
You are viewing a single comment's thread. Return to all comments →
the first step of my algorithm is to generate all the primitive triples and their multiples with perimeter less or equal 5*10^6 using Euclid's formula, and in first instance I assumed that m<=1200 was sufficient to generate al the triples (I've approximated n=m, so max perimeter was near 4*1200^2) but this way I was loosing some triangles generated by higher m...