Created
August 23, 2013 07:03
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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