Skip to content

Instantly share code, notes, and snippets.

@kozake
Last active December 10, 2015 02:18
Show Gist options
  • Save kozake/4367136 to your computer and use it in GitHub Desktop.
Save kozake/4367136 to your computer and use it in GitHub Desktop.
Project Euler Problem 4
/**
* Project Euler Problem 4
*/
object P4 {
def isKaibunNumber(n:Int):Boolean = n.toString == n.toString.reverse
def answer():Int = (for(i <- 100 to 999; j <- 100 to 999; if (isKaibunNumber(i * j))) yield (i * j)).max
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment