+ 1

Project Euler Problem #12?

What are some tips for solving it? Every solution I can come up with seems to take far too long to get the target number.

18th Mar 2019, 11:53 PM
Daniel Cooper
Daniel Cooper - avatar
5 Respostas
+ 2
Ani Jona 🕊 I'm not too smart and haven't done really any math in like 2 or 3 years xD Can you explain that in a way I could understand better if it's not too much trouble?
19th Mar 2019, 11:35 PM
Daniel Cooper
Daniel Cooper - avatar
+ 2
Sorry for the late response. Been busy. Thanks for the explanation. Really helped out. I'll take a few days trying to understand all of this. Lol. But I've learned a bit more because of this. Thanks! Ani Jona 🕊
21st Mar 2019, 9:46 PM
Daniel Cooper
Daniel Cooper - avatar
+ 1
https://code.sololearn.com/cmhAF2Vi1DQ1/?ref=app So here's what I came up with. This would take far too long to find the first triangle number with 500 factors. Would using functions perform faster? What are other ways to solve this? Is this even good code? xD Edit: Fyi, this isn't the actual code, this just lists the first 10. Plus in the real code, I wouldn't output anything until the count is above 500.
19th Mar 2019, 7:24 AM
Daniel Cooper
Daniel Cooper - avatar