Advertisement
Guest User

Untitled

a guest
Sep 8th, 2014
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.22 KB | None | 0 0
  1.      scala.io.Source.stdin.getLines().drop(1)
  2.          .map(_.toInt)
  3.          .map(1 until _)
  4.          .map(_.foldLeft(0)((acc, b) => acc+ (if (b%5==0 || b%3==0) b else 0)))
  5.          .map(println(_))
  6.          .toList
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement