Skip to content

Instantly share code, notes, and snippets.

@zonble
Last active January 31, 2018 17:05
Show Gist options
  • Save zonble/9d2a65cabf9c392f3e98d18a5e63210d to your computer and use it in GitHub Desktop.
Save zonble/9d2a65cabf9c392f3e98d18a5e63210d to your computer and use it in GitHub Desktop.
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