-
-
Save zonble/9d2a65cabf9c392f3e98d18a5e63210d to your computer and use it in GitHub Desktop.
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
def solution(n): | |
sorted_n = sorted(str(n)) | |
i = pow(10, len(str(n))) | |
return len([x for x in range(0, i) if sorted(str(x)) == sorted_n]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment