You are viewing a single comment's thread. Return to all comments →
import re for _ in range(int(input())): n=input() if re.findall(r"^hackerrank.+",n): print(1) elif re.findall(r"^.+hackerrank$",n): print(2) elif re.findall(r"^hackerrank$",n): print(0) else: print(-1)
Seems like cookies are disabled on this browser, please enable them to open this website
Find HackerRank
You are viewing a single comment's thread. Return to all comments →