Yeah, yeah, cheesy title. Couldn't think of anything better, so sue me...
Anyway, This is an obfuscation contest. i'm going to lay down some parameters (hopefully strict, clear, and concise as to input and output) and you (my lucky reader) are going to try to create the most obfuscated program you can that adheres to the specifications.
Rules:
- You are to receive a number on command line. The number will be positive (> 0) and less than 999,999 (due to constraints on my time).
- You will output a certain number of primes equal to the number submitted on command line. They will probably not be the smallest, but they must be in order and no duplicates.
- The algorithm:
- Let p be 3.
- Iterate over the expression x^2 + x + p such that 0 < x < p.
- For every number iterated over, check to see whether it is prime or not (using any algorithm). If it is add it to the list of primes found so far.
- Increment p to the next prime.
- Repeat from step 2 until the number of primes specified is found.
- When printing primes, print 2 first, then the rest.
- Printing more primes is not faultable, but not optimal. Printing more than twice the number specified will automatically discount your entry.
- All primes output must be \s delimited.
- All entries must be smaller than 4k of text.
- All entries must finish before the heat death of the universe.
- Strict and warnings are not necessary. No modules.
jynx
Update: The "contest" will finish December 1st (of 2002) and <shameless plug> there will be a prize! </shameless plug>
Update2: i'm not going to give a prize when only 2 people entered submissions (sorry). i may by consolation prizes for them so that they don't feel gypped, but hopefully i'll get more turn-out next time... ;-)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Mission: Obfuscation (1)
by premchai21 (Curate) on Nov 19, 2002 at 02:18 UTC | |
Re: Mission: Obfuscation (1)
by jryan (Vicar) on Nov 19, 2002 at 06:45 UTC | |
Re: Mission: Obfuscation (1)
by diotalevi (Canon) on Nov 19, 2002 at 02:31 UTC | |
by jynx (Priest) on Nov 19, 2002 at 12:07 UTC | |
Re: Mission: Obfuscation (1)
by diotalevi (Canon) on Nov 20, 2002 at 18:18 UTC | |
by jynx (Priest) on Nov 20, 2002 at 19:35 UTC | |
What happened to Mission: Obfuscation (1)?
by Mr. Muskrat (Canon) on Feb 06, 2003 at 17:14 UTC | |
by diotalevi (Canon) on Feb 06, 2003 at 20:02 UTC |
Back to
Meditations