Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- scala.io.Source.stdin.getLines().drop(1)
- .map(_.toInt)
- .map(1 until _)
- .map(_.foldLeft(0)((acc, b) => acc+ (if (b%5==0 || b%3==0) b else 0)))
- .map(println(_))
- .toList
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement