a thoughtful web.
Good ideas and conversation. No ads, no tracking.   Login or Take a Tour!
comment by bhrgunatha
bhrgunatha  ·  3131 days ago  ·  link  ·    ·  parent  ·  post: Help me learn new things! – Cryptography

So I solved 94! Thanks for the tip.

In order to solve it I took your approach, and failed. I assume because not every n, n, n ± 1 forms a valid triangle and my filtering was obviously wrong. Using brute force feels wrong, but of course I do use that. It just seems like there must be a better approach and the large numbers in the questions are obviously there to discourage brute-force.

My winning approach was to generate pythagorean triples (as I already had code to do just that) and use those which apply to the question. Although relatively slow (still < 1 minute) it got me into the forum which shows a couple of much faster, very direct approaches to the solution.

Since lots of Euler questions involve solving for integers - often with 2 variables - I'd like to request an introduction to diophantine equations - and I keep coming across Pell's equation in the forums which looks like it's related.

    Ad. 93 ... I would love to get explanations and tips myself actually.

Once you've solved it you get a link to a forum topic for that question. There are usually lots of good advice in those.





Devac  ·  3131 days ago  ·  link  ·  
This comment has been deleted.