Skip to content

Instantly share code, notes, and snippets.

@kazua
Created November 12, 2013 13:04
Show Gist options
  • Save kazua/7430468 to your computer and use it in GitHub Desktop.
Save kazua/7430468 to your computer and use it in GitHub Desktop.
Project Euler Problem 120
//http://odz.sakura.ne.jp/projecteuler/index.php?cmd=read&page=Problem%20120
//write kazua
object problem120 {
def problem120 = (3 to 1000).map(i => 2 * i * ((i - 1) / 2)).sum
def main(args : Array[String]) {
println(problem120)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment