You are viewing a single comment's thread. Return to all comments →
And here's how I did it in Python 3:
t = int(input()) for a in range(t): s = input() TorF = all([abs(ord(s[i]) - ord(s[i-1])) == abs(ord(s[-i]) - ord(s[-i-1])) for i in range(1, len(s)//2+1)]) print('Funny' if TorF else 'Not Funny')
Seems like cookies are disabled on this browser, please enable them to open this website
Funny String
You are viewing a single comment's thread. Return to all comments →
And here's how I did it in Python 3: