Created
March 14, 2016 19:01
-
-
Save sjwiesman/d93da6c5e259b2f7c030 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def rule(num: Long) = (1 to 10).map(digit => (num / Math.pow(10, 10 - digit).toInt) % digit).forall(_==0) | |
"123456789".permutations.map(number => number ++ "0").map(_.toLong).filter(rule) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment