Skip to content

Instantly share code, notes, and snippets.

@goldeneggg
Created November 6, 2013 15:13
Show Gist options
  • Select an option

  • Save goldeneggg/7337663 to your computer and use it in GitHub Desktop.

Select an option

Save goldeneggg/7337663 to your computer and use it in GitHub Desktop.
project euler 24
package ssbt
object Euler24 {
def main(args: Array[String]) {
val result = List(0, 1, 2, 3, 4, 5, 6, 7, 8, 9).permutations.zipWithIndex.filter(_._2 == 999999).next._1.mkString
println("Answer %s".format(result))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment