Wednesday, June 3, 2009

Proejct Euler Problem 1

Got to know about Project Eular.
So thought about posting a few solutions using groovy. For the 1st problem, the solution is pretty simple

def series3=0;
def series5=0;
def series15=0;
0.step(1000,3){series3+=it}
0.step(1000,5){series5+=it}
0.step(1000,15){series15+=it}
def result=series3 +series5 - series15


The emperor and me beaching

The Devil next door

Kaiser The Emperor