Created
May 25, 2015 23:56
-
-
Save dimiro1/c2dbfa8f0d32817b71e0 to your computer and use it in GitHub Desktop.
Permutations Ruby
This file contains hidden or 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
[2,3,5,6,7,9].permutation(3).map {|e| e.join.to_i % 5 == 0 }.count { |i| i == true } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment