[Challenge] Programming Contest #2

Posts 115 of 34 · Page 1 of 3
[Challenge] Programming Contest #2: Circular Primes.
Alright fags and fagettes. Last time you all bitched out so I decided to make a nice easy one for all you lazy bastards that didn't do it last time. Here's the question:

Code:
Find the NUMBER of CIRCULAR PRIMES that are BELOW the number 500000
An optional kicker is, no string manipulation.

Anyway, I expect way more entries this time, as Patrick has been on my ass all day to put this thread up.

@why06 Get your lazy ass in here
@Hassan Don't say I didn't tell you
@Hell_Demon Another epic solution pl0x
@Void Another 97 minute solution pl0x
@virtual An entry pl0x
@'Bruno A Portuguese entry pl0x
@Alen No excuses Alen
@Blubb1337 Prove that Nazis ain't all bad
@master131 ANOTHER SOLUTION PLXX
@freedompeace Don't bitch out this time
@NextGen1 DO ET, I don't care if you're tired

Now, I will close this in approx 7 days (though it took me 10 mins to write my own solution, but you guys all have inferior coding skills to me so I'll give you a fair warning)

PLEASE ACTUALLY ENTER THIS TIME OR YOU LOSE MY RESPECT

Cheers,
Your friendly neighborhood Jason.

Hop to it!
... do I really need Jason's respect? And what's with this fascination with prime numbers? I say leave math to the mathematician, there's a reason Primes are so hard to get, and that's cause there's no formula for them, of course that's also what makes them so valuable to security and encryption experts, but I really don't feel like writing code that just test processor speed. I you guys want specs I have a AMD Turion X2, Dual Core 64 bit processor. Are we done or should I run some benchmarks too?
Quote Originally Posted by why06 View Post
... do I really need Jason's respect? And what's with this fascination with prime numbers? I say leave math to the mathematician, there's a reason Primes are so hard to get, and that's cause there's no formula for them, of course that's also what makes them so valuable to security and encryption experts, but I really don't feel like writing code that just test processor speed. I you guys want specs I have a AMD Turion X2, Dual Core 64 bit processor. Are we done or should I run some benchmarks too?
Uhm...righto. Coulda just said "I'm not going to enter".
Prime numbers algorithm is quite simple tho...

Although finding all prime numbers below 500k... =X takes a while... and then circulars

Rotfl from 1-500000, 41538 are Prime Numbers... Someone that could confirm that?
Submitted mine, runs in 62 miliseconds on my shitty old pc
#1 ran in 1300ish miliseconds on my pc and 250 ms on jasons pc, so this one will run in 10-20ish i guess ^^
Quote Originally Posted by Hell_Demon View Post
Submitted mine, runs in 62 miliseconds on my shitty old pc
#1 ran in 1300ish miliseconds on my pc and 250 ms on jasons pc, so this one will run in 10-20ish i guess ^^
nvm.. i was messing up in my head..

----

and find out why it was taking a while to get all prime numbers... how stupid
Quote Originally Posted by Hell_Demon View Post
Submitted mine, runs in 62 miliseconds on my shitty old pc
#1 ran in 1300ish miliseconds on my pc and 250 ms on jasons pc, so this one will run in 10-20ish i guess ^^
Dude, your logic is really strong ! I doubt anyone can compete you :/
Finished my entry in VB.NET, completes in 218ms. Oh and nice solution HD, seems very complicated since it doesn't use any string functions.
*Cries* HD is jus to pro
Back from school (thread was closed this morning).

Clocked in at 150ms

I think I missed osmething though,a nd it was rushed (look at the variable naming lol)
who the hell opened this back up?
Quote Originally Posted by why06 View Post
who the hell opened this back up?
NG .
Quote Originally Posted by why06 View Post
who the hell opened this back up?
NextGen I think, because it was never supposed to be closed.
Gonna work on this after school
Posts 115 of 34 · Page 1 of 3

Post a Reply

Tags for this Thread

None

Need help?