Our server costs ~$56 per month to run. Please consider donating or becoming a Patron to help keep the site running. Help us gain new members by following us on Twitter and liking our page on Facebook!
Current time: August 6, 2025, 1:43 am

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Project Euler
#9
RE: Project Euler
(July 3, 2016 at 1:52 am)SteelCurtain Wrote: I'm working on #12 right now.

I'm on a slow shitty computer at work using Python and IDLE now. The summation of primes problem was too much for the online shells, they time out after like 5 seconds, the stingy bastards. Hard to sum all of the primes below 2,000,000 in 5 seconds with an online shell.

Now I am finding all of the divisors in triangle numbers, finding the first triangle number with more than 500 divisors. The code was easy, but it's been running for quite a time. I've tried to make it as economical as possible, but I don't care to think too hard about it. Smile

That's what I mean by hacky: maybe not the most efficient code, and that's why this is good practice. I am trying to loop as few times as possible when having nested loops running two million times.

Can I give you a hint on how to deal with primes in the case of very large numbers?
Reply



Messages In This Thread
Project Euler - by Grandizer - June 26, 2016 at 12:41 am
RE: Project Euler - by SteelCurtain - June 26, 2016 at 4:35 am
RE: Project Euler - by Grandizer - June 26, 2016 at 4:39 am
RE: Project Euler - by SteelCurtain - June 26, 2016 at 4:40 am
RE: Project Euler - by Grandizer - June 26, 2016 at 9:02 am
RE: Project Euler - by SteelCurtain - June 28, 2016 at 4:58 am
RE: Project Euler - by Grandizer - June 28, 2016 at 11:50 am
RE: Project Euler - by SteelCurtain - July 3, 2016 at 1:52 am
RE: Project Euler - by Grandizer - July 3, 2016 at 2:46 am
RE: Project Euler - by SteelCurtain - July 3, 2016 at 6:20 am
RE: Project Euler - by Grandizer - July 3, 2016 at 6:27 am
RE: Project Euler - by Grandizer - July 3, 2016 at 6:32 am
RE: Project Euler - by A Handmaid - July 3, 2016 at 6:37 am
RE: Project Euler - by Grandizer - July 3, 2016 at 7:37 am
RE: Project Euler - by SteelCurtain - July 3, 2016 at 7:44 am
RE: Project Euler - by Grandizer - July 3, 2016 at 7:57 am
RE: Project Euler - by A Handmaid - July 3, 2016 at 8:02 am
RE: Project Euler - by Grandizer - July 3, 2016 at 8:06 am
RE: Project Euler - by SteelCurtain - July 3, 2016 at 8:02 am
RE: Project Euler - by SteelCurtain - July 3, 2016 at 8:16 am
RE: Project Euler - by Grandizer - July 3, 2016 at 8:58 am
RE: Project Euler - by SteelCurtain - July 3, 2016 at 10:24 pm
RE: Project Euler - by Grandizer - July 4, 2016 at 2:05 am
RE: Project Euler - by SteelCurtain - July 4, 2016 at 2:15 am
RE: Project Euler - by SteelCurtain - July 4, 2016 at 4:47 am
RE: Project Euler - by Grandizer - July 4, 2016 at 5:24 am
RE: Project Euler - by SteelCurtain - July 4, 2016 at 5:31 am
RE: Project Euler - by Grandizer - July 4, 2016 at 5:36 am
RE: Project Euler - by Grandizer - July 5, 2016 at 5:36 pm

Possibly Related Threads...
Thread Author Replies Views Last Post
  [Euler] Need clarification shadowdancer 11 4816 November 22, 2011 at 2:17 am
Last Post: shadowdancer



Users browsing this thread: 1 Guest(s)