Skip to content

Instantly share code, notes, and snippets.

@djadmin
Created August 23, 2013 07:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djadmin/6316329 to your computer and use it in GitHub Desktop.
Save djadmin/6316329 to your computer and use it in GitHub Desktop.
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