Created
November 26, 2012 11:32
-
-
Save kazua/4147764 to your computer and use it in GitHub Desktop.
Project Euler Problem 01
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%201 | |
| //K.A | |
| object problem01 { | |
| def getMtp(mn : Int) : Int = { | |
| Range(1, mn).toList.filter(i => i % 3 == 0 || i % 5 == 0).sum | |
| } | |
| def main(args : Array[String]) { | |
| val mn = 1000 | |
| println(getMtp(mn)) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment