Skip to content

Instantly share code, notes, and snippets.

@djadmin

djadmin/uk-and-us

Created Aug 23, 2013
Embed
What would you like to do?
HackerRank- The British and American style of Spelling https://www.hackerrank.com/challenges/uk-and-us
TEXT=''
sum=0
N=int(raw_input())
for i in xrange(N):
TEXT+=' '+str(raw_input())
T=int(raw_input())
for i in xrange(T):
FIND=str(raw_input())
print TEXT.count(FIND)+TEXT.count(FIND[:-2]+'se')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment