You are viewing a single comment's thread. Return to all comments →
import re for _ in range(int(input())): s=input() if re.search(r'^hackerrank(.*hackerrank)?$',s): print(0) elif re.search(r'^hackerrank',s): print(1) elif re.search(r'hackerrank$',s): print(2) 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 →