Created
November 12, 2013 13:04
-
-
Save kazua/7430468 to your computer and use it in GitHub Desktop.
Project Euler Problem 120
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //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