Created
June 25, 2016 15:41
-
-
Save gummibeatz/f2455ca670def88950a0bbf912455fd9 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 solution(num): | |
num_str = str(num) | |
solution_set = Set() | |
for subset in permutations(num_str, len(num_str)): | |
if subset[0] != '0' or len(subset) == 1: | |
solution_set.add(subset) | |
return len(solution_set) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment