Created
March 22, 2016 00:53
-
-
Save hallfox/29081ea9cd2eba2d8635 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
s, t, xs, start = input(), input(), 26*[0], ord('a') | |
for x,y in zip(s,t): | |
xs[ord(x)-start] += 1 | |
xs[ord(y)-start] -= 1 | |
print("anagram") if len(s) == len(t) and xs == 26*[0] else print("no") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment