Skip to content

Instantly share code, notes, and snippets.

@siosio
Created December 26, 2012 05:51
Show Gist options
  • Save siosio/4378227 to your computer and use it in GitHub Desktop.
Save siosio/4378227 to your computer and use it in GitHub Desktop.
Project Euler:Problem 1
package problem1
fun main(args: Array<String>) {
println((1..999).filter { it % 3 == 0 || it % 5 == 0 }.fold(0) { total, n -> total + n })
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment