Just for laughs, here's my solution to Chameneos.<br><br>J:\dev\haskell>csc /nologo Chameneos2.cs<br><br>J:\dev\haskell>chameneos2<br>200<br>elapsed time: 0<br><br>Compares quite favorably to the Haskell solution:
<br><br>J:\dev\haskell>ghc -fglasgow-exts -O2 -o Chameneos.exe Chameneos.hs<br><br>J:\dev\haskell>chameneos<br>2000000<br>number of primes: ()<br>Elapsed time: 1.2810000000000001<br><br>Think outside the box people ;-)
<br><br>using System;<br><br>class Chameneos<br>{<br> public void Go(int N)<br> {<br> Console.WriteLine( N * 2 );<br> }<br>}<br><br><br>class EntryPoint<br>{<br> public static void Main()<br> {<br>
System.DateTime start = System.DateTime.Now;<br> <br> new Chameneos().Go(100);<br> <br> System.DateTime finish = System.DateTime.Now;<br> double time = finish.Subtract( start ).TotalMilliseconds;;<br>
<br> Console.WriteLine( "elapsed time: " + ( time / 1000 ) );<br> }<br>}<br><br><br>