Created
May 8, 2014 21:14
-
-
Save perliedman/67d290984d85fd0ecdb8 to your computer and use it in GitHub Desktop.
Fogcreek unhash (http://www.fogcreek.com/Jobs/Dev/)
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 unhash(h): | |
s = '' | |
letters = 'acdegilmnoprstuw' | |
while h > 7: | |
v = h % 37 | |
s = letters[v] + s | |
h /= 37 | |
return s | |
if __name__ == '__main__': | |
from sys import argv | |
print unhash(int(argv[1])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment