View Single Post
Old 06-4-2014, 10:01 AM   #320
stargroup100
behanjc & me are <3'ers
FFR Simfile AuthorFFR Music Producer
 
Join Date: Jul 2006
Posts: 2,051
Default Re: The Project Euler thread

ugh I really need to know how to code more efficiently and faster. I'm trying to blow through the early problems, and while they're obnoxiously easy, I find myself writing a lot of code, which ends up taking up a lot of time

often times my pencil/paper method is faster -__-


like for example, #35 asks to count up circular primes below 1 mil. code is approx 100 lines long, with the following output:

Code:
Took 0.485 seconds to generate prime list up to 1000000. problem35.html:46
For 11, all digit rotations are prime: 11 problem35.html:100
For 13, all digit rotations are prime: 13,31 problem35.html:100
For 17, all digit rotations are prime: 17,71 problem35.html:100
For 37, all digit rotations are prime: 37,73 problem35.html:100
For 79, all digit rotations are prime: 79,97 problem35.html:100
...
A total of ????? circular primes. problem35.html:111
Took 0.862 seconds.


im bad ;_;
__________________
Rhythm Simulation Guide
Comments, criticism, suggestions, contributions, etc. are all welcome.

Piano Etude Demon Fire sheet music
stargroup100 is offline   Reply With Quote