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.
For 50 the answer should be 0.
Because according to your answer that is 6 which is only possible when you add all the right triangles of length <50.
But according to your question the lenght of wire must be equal to the sum of all the sides of triangle
for eg-12-(3,4,5)->3+4+5=12
but if you are giving 50 as your input and giving 6 as an output which means that you are incresing your count values for 12,24,30,36,40,48 which gives you answer 6. while doing that you are contradiciting 1 condition that is sum of edges should be equal to the given length.
please reply me soon with your suggestion.
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 →
For 50 the answer should be 0. Because according to your answer that is 6 which is only possible when you add all the right triangles of length <50. But according to your question the lenght of wire must be equal to the sum of all the sides of triangle for eg-12-(3,4,5)->3+4+5=12 but if you are giving 50 as your input and giving 6 as an output which means that you are incresing your count values for 12,24,30,36,40,48 which gives you answer 6. while doing that you are contradiciting 1 condition that is sum of edges should be equal to the given length. please reply me soon with your suggestion.