Problem:

Finding a Word

Write a program which reads a word W and a text T, and prints the number of word W which appears in text T

  T consists of string Ti separated by space characters and newlines. Count the number of Ti which equals to W. The word and text are case insensitive.

Constraints

  
The length of W ≤ 10

  
W consists of lower case letters

The length of T in a line ≤ 1000

Input

  In the first line, the word W is given. In the following lines, the text T is given separated by space characters and newlines.

"END_OF_TEXT" indicates the end of the text.

Output

  Print the number of W in the text.

Sample Input

computer
Nurtures computer scientists and highly-skilled computer engineers
who will create and exploit "knowledge" for the new era.
Provides an outstanding computer environment.
END_OF_TEXT

Sample Output

3



Sample input:
computer
Nurtures computer scientists and highly-skilled computer engineers
who will create and exploit "knowledge" for the new era.
Provides an outstanding computer environment.
END_OF_TEXT


Sample output:
3

Submission status: Wrong Answer

Solution code:
def main():
    W = input()
    T = list(linein())

    ans = 0
    for t in T:
        ans += t.count(W)

    print(ans)

def linein():
    while True:
        try:
            s = input()
            if s == 'END_OF_TEXT':
                break
            yield ''.join(s)
        except EOFError:
            break

main()

Submission status: Wrong Answer

Solution code:
def main():
    W = input()
    T = list(linein())

    ans = 0
    for t in T:
        ans += t.lower().count(W)

    print(ans)

def linein():
    while True:
        try:
            s = input()
            if s == 'END_OF_TEXT':
                break
            yield ''.join(s)
        except EOFError:
            break

main()

Submission status: Wrong Answer

Solution code:
def main():
    W = input()
    T = list(linein())

    w = W.lower()
    ans = 0
    for t in T:
        ans += t.lower().count(w)

    print(ans)

def linein():
    while True:
        try:
            s = input()
            if s == 'END_OF_TEXT':
                break
            yield ''.join(s)
        except EOFError:
            break

main()

Submission status: Wrong Answer

Solution code:

T=""
s= input()
while True:
    t=input()
    T += t + " "
    if T.count("END_OF_TEXT")>0:
        break

M = T.count(str(s))

print (M)

Submission status: Wrong Answer

Solution code:
T=""
s= input()
while True:
    t=input()
    T += t + " "
    if T.count("END_OF_TEXT")>0:
        break

M = T.lower().count(str(s.lower()))

print (M)

Submission status: Wrong Answer

Solution code:
n = 0
T=""
s= input()
while True:
    t=input()
    T += t + " "
    if T.count("END_OF_TEXT")>0:
        break

TL = T.split(" ")
print (TL)
for i in TL:
    if i == str(s):
        n +=1
    else:
        pass
print (n)

Submission status: Wrong Answer

Solution code:
n = 0
T=""
s= input()
while True:
    t=input()
    T += t + " "
    if T.count("END_OF_TEXT")>0:
        break

TL = T.split(" ")

for i in TL:
    i = i.replace('"','')
    i= i.replace(".","")
    if i == str(s):
        n += 1
    else:
        pass
print (n)

Submission status: Wrong Answer

Solution code:
W=input()
T=""
while True:
    line_sentence=input()
    if line_sentence=="END_OF_TEXT":
        break
    T+=line_sentence.lower()

print(T.count(W))

Submission status: Wrong Answer

Solution code:
W=input()
T=""
while True:
    line_sentence=input()
    if line_sentence=="END_OF_TEXT":
        break
    T+=" "+line_sentence.lower()

print(T.count(W))

Submission status: Wrong Answer

Solution code:
W=" "+input()+" "
T=""
while True:
    line_sentence=input()
    if line_sentence=="END_OF_TEXT":
        break
    T+=" "+line_sentence.lower()

print(T.count(W))

Submission status: Wrong Answer

Solution code:
w = input()
ans = 0

while True:
  s = input().split()

  if s[0] == "END_OF_TEXT":
    break

  ans += s.count(w)

print(ans)

Submission status: Wrong Answer

Solution code:
w = input().upper()
ans = 0

while True:
  s = input().upper().split()

  if s[0] == "END_OF_TEXT":
    break

  ans += s.count(w)

print(ans)

Submission status: Wrong Answer

Solution code:
w = input()

i = 0

while True:
	t = input()
	if t == "END_OF_TEXT":
		break
	if w in t:
		i += 1

print(i)

Submission status: Wrong Answer

Solution code:
w = input()

i = 0

while True:
	t = input()
	if t == "END_OF_TEXT" or not t:
		break
	if w in t:
		i += 1

print(i)

Submission status: Wrong Answer

Solution code:
w = input()

i = 0

while True:
	t = input()
	if t == "END_OF_TEXT" or not t:
		break
	if w in t:
		i += 1

if i != 0:
	print(i)

Submission status: Wrong Answer

Solution code:
search_s = input()
cnt =  0
while True:
    word_list = input().split()
    if word_list[0] == "END_OF_TEXT" : break
    for word in word_list:
        if word == search_s:cnt += 1

print(cnt)

Submission status: Wrong Answer

Solution code:
W=input()
s=0
while True:
 T=list(input().split())
 if T==['END_OF_TEXT']:
   break
 else:
   for i in T:
     if i==W:
        s+=1
print(s)

Submission status: Wrong Answer

Solution code:
z=''
a=''
b=input()
while True:
    if z=='END_OF_TEXT':
        break
    z=input()
    a+=z
print(a.count(b))

Submission status: Wrong Answer

Solution code:
z=''
a=''
b=input()
a1=''
while True:
    if z=='END_OF_TEXT':
        break
    z=input()
    z1=z.lower()
    a+=z1+''

print(a)
print(a.count(b))

Submission status: Wrong Answer

Solution code:
z=''
a=''
b=input()
a1=''
while True:
    if z=='END_OF_TEXT':
        break
    z=input()
    z1=z.lower()
    a+=z1+''

print(a.count(b))

Submission status: Wrong Answer

Solution code:
W = ' '+input()+' '
T=' '

while True:
    txt = input()
    if txt == 'END_OF_TEXT': break
    T += txt + ' '
ret = T.count(W)
if ret == -1: ret = 0
print(ret)

Submission status: Wrong Answer

Solution code:
W = input().lower()
T=''
 
while True:
    txt = input()
    if txt == 'END_OF_TEXT': break
    T += txt.lower() + ' '
print(T.count(W))

Submission status: Wrong Answer

Solution code:
search = raw_input()
sentence = []
while 1:
    input_data = raw_input()
    if input_data == 'END_OF_TEXT':
        break
    sentence += [input_data]
    
ret = 0
for word in sentence:
    ret += word.count(search)
print ret

Submission status: Wrong Answer

Solution code:
search = raw_input().upper()
sentence = []
while 1:
    input_data = raw_input()
    if input_data == 'END_OF_TEXT':
        break
    sentence += [input_data.upper()]
    
ret = 0
for word in sentence:
    ret += word.count(search)
print ret

Submission status: Wrong Answer

Solution code:
W = input()
counter = 0
T = []
while True:
    string = input()
    if string == "END_OF_TEXT":
        break
    else:
        T.append(string)
for i in range(len(T)):
    memo = T[i].split()
    for j in range(len(memo)):
        if memo[j] == W:
            counter += 1
print(counter)

Submission status: Wrong Answer

Solution code:
# Aizu Problem ITP_1_9_A: Finding a Word
#
import sys, math, os

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")


word = input().strip()
count = 0
while True:
    text = input().strip()
    if text == "END_OF_TEXT":
        break
    count += text.count(word)
print(count)

Submission status: Wrong Answer

Solution code:
# Aizu Problem ITP_1_9_A: Finding a Word
#
import sys, math, os

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")


word = input().strip().lower()
count = 0
while True:
    text = input().strip()
    if text == "END_OF_TEXT":
        break
    count += text.lower().count(word)
print(count)

Submission status: Wrong Answer

Solution code:
import sys
w = input()
c = 0
for line in sys.stdin:
    if line == "END_OF_TEXT\n":
        break
    c += line.lower().count(w)
print(c)

Submission status: Wrong Answer

Solution code:
y = input().lower()
cnt = 0
s=""
while True:
    x = input().lower()
    if x == "end_of_text":
        break
    s += x
    for i in x:
        if i == y:
            cnt += 1
print(cnt)

Submission status: Wrong Answer

Solution code:
y = input().lower()
cnt = 0
s=[]
while True:
    x = input().lower()
    if x == "end_of_text":
        break
    s += x.split()
    for i in s:
        if i == y:
            cnt += 1
print(cnt)

Submission status: Wrong Answer

Solution code:
y = input().lower()
cnt = 0
s=[]
while True:
    x = input().lower()
    if x == "end_of_text":
        break
    s += x.split()
for i in s:
    if i == y:
        cnt += 1
print(cnt)

Submission status: Wrong Answer

Solution code:
word = input()

string = input()
last = ""

while last != "END_OF_TEXT":
	last = input()
	string += last
	
print(string.count(word))

Submission status: Wrong Answer

Solution code:
word = input()

string = input().lower()
last = ""

while last != "END_OF_TEXT":
	last = input()
	string += last.lower()
	
print(string.count(word))

Submission status: Wrong Answer

Solution code:
cnt = 0

W = input()

while True:
    T = input().split()
    if T[0] == "END_OF_TEXT":
        break
    for word in T:
        if W == word:
            cnt += 1

print(cnt)

Submission status: Wrong Answer

Solution code:
w = input()
t = ""
while 1:
    try:
        t += input()
    except EOFError:
        break

print(t.count(w))

Submission status: Wrong Answer

Solution code:
w = input()
t = ""
while 1:
    try:
        t += input().lower()
    except EOFError:
        break

print(t.count(w))

Submission status: Wrong Answer

Solution code:
w = input()
t = ""
while 1:
    try:
        t += input().lower()
    except EOFError:
        break
s = t.split()
count = 0
for i in s:
    if i == w:
        count += 1
print(count)

Submission status: Wrong Answer

Solution code:
w = input()
t = ""
while 1:
    try:
        t += input().lower()
        t += " "
    except EOFError:
        break
s = t.split()
print(s)
count = 0
for i in s:
    if i == w:
        count += 1
print(count)

Submission status: Wrong Answer

Solution code:
import re

def reader():
    p = re.compile(input())
    yield 0
    while True:
        s = input()
        if s == "END_OF_TEXT":
            break
        yield len(p.findall(s))

print(sum(reader()))

Submission status: Wrong Answer

Solution code:
import re

def reader():
    p = re.compile(input(), re.I)
    yield 0
    while True:
        s = input()
        if s == "END_OF_TEXT":
            break
        yield len(p.findall(s))

print(sum(reader()))

Submission status: Wrong Answer

Solution code:
import re

def reader():
    p = re.compile(input(), re.I)
    yield 0
    while True:
        s = input()
        if s == "END_OF_TEXT":
            break
        for w in s.split():
            if p.match(w):
                yield 1

print(sum(reader()))

Submission status: Wrong Answer

Solution code:
c=0
p=input().upper()
while True:
    s=input()
    if s =='END_OF_TEXT':
        break
    a=s.upper().split()
    for i in a:
        if p in i:
           c+=1
print(c)

Submission status: Wrong Answer

Solution code:
c=0
s=''
p=input().upper()
while True:
    s1=input()
    if s1 =='END_OF_TEXT':
        break
    s+=s1
a=s.upper().split()
for i in a:
    if p in i:
       c+=1
print(c)

Submission status: Wrong Answer

Solution code:
c=0
s=''
p=input().upper()
while True:
    s1=input()
    if s1 =='END_OF_TEXT':
        break
    s+=s1.upper()
a=s.upper().split()
for i in a:
    if p in i:
       c+=1
print(c)

Submission status: Wrong Answer

Solution code:
c=0
s=''
p=input().upper()
while True:
    s=input()
    if s =='END_OF_TEXT':
        break
    a=s.upper().split()
    for i in a:
 
        if p in i:
            c+=1
print(c)

Submission status: Wrong Answer

Solution code:
import re
c=0
s=''
p=input().upper()
ptn=re.compile(r'^'+p+r'$')

while True:
    s=input()
    if s =='END_OF_TEXT':
        break
    a=s.upper().split()
    for i in a:
        print(i)
        if re.match(ptn, i):
            c+=1
print(c)

Submission status: Wrong Answer

Solution code:
import re
c=0
p=input().upper()
ptn=re.compile(r'^'+p+r'$')

while True:
    s=input()
    if s =='END_OF_TEXT':
        break
    a=s.upper().split()
    for i in a:
        print(i)
        if re.match(ptn, i):
            c+=1
print(c)

Submission status: Wrong Answer

Solution code:
word=input()
how_in=0
while True:
    try:
        statement=input()
    except:
        break
    if statement=='END_OF_TEXT':
        break
    statement=statement.lower()
    if word in statement :
        how_in+=statement.count(word)

print(how_in)

Submission status: Wrong Answer

Solution code:
word=input()
how_in=0
while True:
    try:
        statement=input()
    except:
        break
    if statement=='END_OF_TEXT':
        break
    statement=statement.lower()
    statement=statement.replace(' ','')
    if word in statement :
        how_in+=statement.count(word)

print(how_in)

Submission status: Wrong Answer

Solution code:
word = input()
text = []
c = 0
while True:
    read = input().lower().split()
    if read[0] == 'end_of_text':
        break
    else:
        text.append(read)
for i in text:
    for n in i:
        if word in n:
            c += 1
print(c)

Submission status: Wrong Answer

Solution code:
word = input().lower()
text = []
c = 0
while True:
    read = input().split()
    if read[0] == 'END_OF_TEXT':
        break
    else:
        text.append(read)
for i in text:
    for n in i:
        if word in n.lower():
            c += 1
print(c)

Submission status: Wrong Answer

Solution code:
W, c = input(), 0
for Ti in iter(input, 'END_OF_TEXT'):
    c += Ti.lower().count(W)
print(c)

Submission status: Wrong Answer

Solution code:
W, c = input(), 0
Wl = len(W)
for line in iter(input, 'END_OF_TEXT'):
    for Ti in  line.lower().split():
        if W in Ti:
            for i in range(Wl+1):
                if W == Ti[i:i+Wl]:
                    c +=1
print(c)

Submission status: Wrong Answer

Solution code:
word = raw_input()
counter = 0
while True:
    line = raw_input()
    if line == "END_OF_TEXT":
        break
    counter += line.split(" ").count(word)

print counter

Submission status: Wrong Answer

Solution code:
word = raw_input()
counter = 0
while True:
    line = raw_input().lower()
    if line == "end_of_text":
        break
    counter += line.split(" ").count(word)

print counter

Submission status: Wrong Answer

Solution code:
w = input()
text = ''
while True:
    t = input()
    if t == 'END_OF_TEXT':
        break
    text += t
print(len(text.split(w)) - 1)

Submission status: Wrong Answer

Solution code:
w = input().lower()
text = ''
while True:
    t = input()
    if t == 'END_OF_TEXT':
        break
    text += t.lower()
print(len(text.split(w)) - 1)

Submission status: Wrong Answer

Solution code:
w = input().lower()
text = ''
while True:
    t = input()
    if t == 'END_OF_TEXT':
        break
    text += ' ' + t.lower()
print(len(text.split(w)) - 1)

Submission status: Wrong Answer

Solution code:
w = input().lower()
text = ''
while True:
    t = input()
    if t == 'END_OF_TEXT':
        break
    text += t.lower() + '\n'
print(len(text.split(w)) - 1)

Submission status: Wrong Answer

Solution code:
w = ' ' + input().lower()
text = ''
while True:
    t = input()
    if t == 'END_OF_TEXT':
        break
    text += t.lower() + '\n'
print(len(text.split(w)) - 1)

Submission status: Wrong Answer

Solution code:
w = raw_input()

words = []
while True:
	if raw_input().strip() == "END_OF_TEXT":
		break
	else:
		line = raw_input().split()
		words += line

cnt = 0
for word in words:
	if w == word:
		cnt += 1
print cnt

Submission status: Wrong Answer

Solution code:
def main():

    target_word = input()
    texts_tuple = tuple()
    
    while True:
        text = input().split()
        if text[0] == 'END_OF_TEXT': break
        texts_tuple += tuple(text)
    
    print(texts_tuple.count(target_word))


main()

Submission status: Wrong Answer

Solution code:
s=input()
cnt=0
while True:
    l=input().split()
    if l[0]=='END_OF_TEXT': break
    for i in range(len(l)):
        lg=len(l[i])-1
        if not l[i][lg].isalpha(): l[i]=l[i][:lg]
        cnt+=(s==l[i])
print(cnt)

Submission status: Wrong Answer

Solution code:
w = input()
a = []
while True:
    t = input()
    if t == "END_OF_TEXT":
        break
    t = t.split()
    a.append(t)
ans = list(item for innerlist in a for item in innerlist)
print(ans.count(w))

Submission status: Wrong Answer

Solution code:
W=input()
r=0
while 1:
  w=input()
  if w == 'END_OF_TEXT':break
  r+=w.count(w)
print(r)

Submission status: Wrong Answer

Solution code:
W=input().upper()
r=0
while 1:
  w=input().upper()
  if w == 'END_OF_TEXT':break
  r+=w.count(w)
print(r)

Submission status: Wrong Answer

Solution code:
W=input().upper()
r=0
while 1:
  w=input().upper()
  if w == 'END_OF_TEXT':break
  r+=w.count(W)
print(r)

Submission status: Wrong Answer

Solution code:
W=input().upper()
r=0
while 1:
  w=input()
  if w == 'END_OF_TEXT':break
  r+=w.upper().count(W)
print(r)

Submission status: Wrong Answer

Solution code:
tt=input()
a=''
while True:
    text=input()
    if text=='END_OF_TEXT':
        break
    a+=text
print(a.count(tt))

Submission status: Wrong Answer

Solution code:
t=input().upper()
a=''
while True:
    e=input().upper()
    if e=='END_OF_TEXT':
        break
    a+=t
print(a.count(t))

Submission status: Wrong Answer

Solution code:
tt=input().upper()
lst=[]
count=0
while True:
    text=input().upper()
    if text=='END_OF_TEXT':
        break
    lst.append(text)
for i in lst:
    count+=i.count(tt)
print(count)

Submission status: Wrong Answer

Solution code:
import sys
w=input().upper()
print(sys.stdin.read().upper().count(w))

Submission status: Wrong Answer

Solution code:
# -*-coding:utf-8

def main():

    W = input()

    count = 0
    while True:
        T = input()
        if(T in 'END_OF_TEXT'):
            break
        else:
            count += T.count(W)

    print(count)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# -*-coding:utf-8

def main():

    W = input().lower()

    count = 0
    while True:
        T = input().lower()
        if(T in 'end_of_text'):
            break
        else:
            count += T.count(W)

    print(count)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# -*-coding:utf-8

def main():

    W = input().lower()

    count = 0
    while True:
        T = input()
        if(T in 'END_OF_TEXT'):
            break
        else:
            T.lower()
            count += T.count(W)

    print(count)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# -*-coding:utf-8

import fileinput

def main():

    W = input().lower()

    count = 0
    for line in fileinput.input():
        count += line.lower().count(W)

    print(count)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    W = input()
    words = []
    while True:
        T = input()
        if T == "END_OF_TEXT":
            break

        words.extend(T.split(" "))

    ans = sum(1 for word in words if word == W)

    print(ans)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
W=input()
T=''
while 1:
 a=input()
 if'END_OF_TEXT'!=a:T+=a
 else:break
print(T.count(W))

Submission status: Wrong Answer

Solution code:
W=input()
T=''
while 1:
 a=input()
 if 'END_OF_TEXT'!=a:T+=a
 else:break
print(T.count(W))

Submission status: Wrong Answer

Solution code:
W=input()
T=''
while 1:
 a=input()
 if'END_OF_TEXT'!=a:T+=a+' '
 else:break
print(T.count(W))

Submission status: Wrong Answer

Solution code:
W=input()
T=''
while 1:
 a=input()
 if'END_OF_TEXT'!=a:T+=(a+' ')
 else:break
print(T.count(W))

Submission status: Wrong Answer

Solution code:
W=input()
T=''
while 1:
 a=input()
 if'END_OF_TEXT'!=a:T+=a
 else:break
 T+=' '
print(T.count(W))

Submission status: Wrong Answer

Solution code:
W=input()
T=''
while 1:
 a=input()
 if'END_OF_TEXT'==a:break
 T+=a
 T+=' '
print(T.count(W))

Submission status: Wrong Answer

Solution code:
W=input()
T=''
while 1:
 a=input()+''
 if'END_OF_TEXT'==a:break
 T+=a
print(T.count(W))

Submission status: Wrong Answer

Solution code:
W=input()
T=''
while 1:
 a=input()+' '
 if'END_OF_TEXT '==a:break
 T+=a
print(T.count(W))

Submission status: Wrong Answer

Solution code:
W=input()
T=''
while 1:
 a=input()+' '
 if'END_OF_TEXT '==a:break
 T+=a.lower()
print(T.count(W))

Submission status: Wrong Answer

Solution code:
W=input().lower()
T=''
while 1:
 a=input()+' '
 if'END_OF_TEXT '==a:break
 T+=a.lower()
print(T.count(W))

Submission status: Wrong Answer

Solution code:
W=input()
T=''
while 1:
 a=input()
 if'END_OF_TEXT'==a:break
 T+=a.lower()
print(T.count(W))

Submission status: Wrong Answer

Solution code:
W=input()
T=''.lower()
while 1:
 a=input()
 if'END_OF_TEXT'==a:break
 T+=a.lower()
print(T.count(W))

Submission status: Wrong Answer

Solution code:
st=input()
count=0
while(True):
    s=input()
    if s=="END_OF_TEXT":
        break
    t=s.split()
    for k in t:
        if k==s:
            count+=1
print(count)

Submission status: Wrong Answer

Solution code:
st=input()
count=0
while(True):
    s=input()
    if s=="END_OF_TEXT":
        break
    t=s.split()
    for k in t:
        if k.lower()==s:
            count+=1
print(count)

Submission status: Wrong Answer

Solution code:
w = input()
t = 0
while True:
    s = input()
    if s == "END_OF_TEXT":
        break
    t += s.count(w)
print(t)

Submission status: Wrong Answer

Solution code:
w = input().lower()
t = 0
while True:
    s = input()
    if s == "END_OF_TEXT":
        break
    t += s.lower().count(w)
print(t)

Submission status: Wrong Answer

Solution code:
x = input()
c = 0
while True:
    s = input()
    if s == 'END_OF_TEXT':
        break
    s = s.split()
    for i in s:
        if x == i:
            c += 1

print(c)

Submission status: Wrong Answer

Solution code:
W = input()
words = ''
while True:
    word = input()
    if word == 'END_OF_TEXT':
        break
    words = words + word
print("{}".format(words.count(W)))

Submission status: Wrong Answer

Solution code:
W = input()
words = ''
while True:
    word = input()
    if word == 'END_OF_TEXT':
        break
    words = words + word.lower()
print("{}".format(words.count(W)))

Submission status: Wrong Answer

Solution code:
W = input()
words = ''
while True:
    word = input()
    if word == 'END_OF_TEXT':
        break
    words = words + word.lower()
print("{}".format(words.count(W)))

Submission status: Wrong Answer

Solution code:
W = input().lower()
words = ''
while True:
    word = input()
    if word == 'END_OF_TEXT':
        break
             
    words = words + word.lower()
print(sum([1 for c in words.split() if c.casefold() == W]))

Submission status: Wrong Answer

Solution code:
W = input().lower()
words = ''
while True:
    word = input()
    if word == 'END_OF_TEXT':
        break
             
    words = words + word.lower() 
print(sum([1 for c in words.split() if c == W]))

Submission status: Wrong Answer

Solution code:
W = input()

c = 0
while True:
    line = input()
    if line == "END_OF_TEXT":
        break
    c += line.lower().count(W)
print(c)

Submission status: Wrong Answer

Solution code:
t = ""
w = input().lower()
while True:
    s = input()
    if s == "END_OF_TEXT":
        break
    t += s.lower()
print(t.count(w))

Submission status: Wrong Answer

Solution code:
s=input();ans=0
while 1:
    a = input()
    if a=="END_OF_TEXT":
        print(ans);break
    ans+=a.count(s)

Submission status: Wrong Answer

Solution code:
s=input().lower();ans=0
while 1:
    a = input()
    if a=="END_OF_TEXT":
        print(ans);break
    ans+=a.lower().count(s)

Submission status: Wrong Answer

Solution code:
# coding:utf-8
W = raw_input()
array = []
cnt = 0
while True:
    split = raw_input().split()
    if split[0] == "END_OF_TEXT":
        break
    for s in split:
        array.append(s)
for word in array:
    if W == word:
        cnt += 1
print cnt

Submission status: Wrong Answer

Solution code:
# coding:utf-8
W = raw_input().upper()
array = []
cnt = 0
while True:
    split = raw_input().upper().split()
    if split[0] == "END_OF_TEXT":
        break
    for s in split:
        array.append(s)
for word in array:
    if W == word:
        cnt += 1
print cnt

Submission status: Wrong Answer

Solution code:
import sys
c = 0
for num, line in enumerate(sys.stdin):
    if line == 'END_OF_TEXT':
        break
    if num == 0:
        hoge = line
        continue
    for word in line.strip().split():
        if word.lower() == hoge:
            c += 1
print (c)

Submission status: Wrong Answer

Solution code:
import sys
c = 0
for num, line in enumerate(sys.stdin):
    if num == 0:
        hoge = line
        continue
    for word in line.strip().split():
        if word.lower() == hoge:
            c += 1
print (c)

Submission status: Wrong Answer

Solution code:
import sys
c = 0
for num, line in enumerate(sys.stdin):
    if line.strip() == 'END_OF_TEXT':
        break
    if num == 0:
        hoge = line
        continue
    for word in line.strip().split():
        if word.lower() == hoge:
            c += 1
print (c)

Submission status: Wrong Answer

Solution code:
a = []
w = input()
while True:
    n = input()
    if n == "END_OF_TEXT":
        break
    a.append(n)

count = 0
for i in range(len(a)):
    count += int((a[i].count(w)))

print (count)

Submission status: Wrong Answer

Solution code:
a = []
w = input().upper()
while True:
    n = input().upper()
    if n == "END_OF_TEXT":
        break
    a.append(n)

count = 0
for i in range(len(a)):
    count += int((a[i].count(w)))

print (count)

Submission status: Wrong Answer

Solution code:

a = []
w = input().upper()
while True:
    n = input().upper()
    if n == "END_OF_TEXT":
        break
    a.append(n)

count = 0

for i in range(len(a)):
    count += int((a[i].count(w)))

print (count)

Submission status: Wrong Answer

Solution code:
a = []
w = input()
while True:
    n = input().upper()
    if n == "END_OF_TEXT":
        break
    a.append(n)

count = 0

w.upper()
for i in range(len(a)):
    a[i] = a[i].lower()

for i in range(len(a)):
    count += int((a[i].count(w)))

print (count)

Submission status: Wrong Answer

Solution code:
a = []
w = input()
while True:
    n = input().upper()
    if n == "END_OF_TEXT":
        break
    a.append(n)

count = 0

w.lower()
for i in range(len(a)):
    a[i] = a[i].lower()

for i in range(len(a)):
    count += int((a[i].count(w)))

print (count)

Submission status: Wrong Answer

Solution code:
a = []
w = input()
while True:
    n = input()
    if n == "END_OF_TEXT":
        break
    a.append(n)

count = 0

w.lower()
for i in range(len(a)):
    a[i] = a[i].lower()

for i in range(len(a)):
    count += int((a[i].count(w)))

print (count)

Submission status: Wrong Answer

Solution code:
word, num = input(), 0
while True:
    sentence = input().lower()
    if sentence=="end_of_text":
        break
    word_list = sentence.replace(".", " ").split()
    for i in word_list:
        if word==i:
            num += 1
print(num)

Submission status: Wrong Answer

Solution code:
word = input()
ans = 0
while True:
    sent = input()
    if sent == 'END_OF_TEXT':
        break
    ans += sent.count(word)
print(ans)

Submission status: Wrong Answer

Solution code:
word = input().upper()
ans = 0
while True:
    sent = input().upper()
    if sent == 'END_OF_TEXT':
        break
    ans += sent.count(word)
print(ans)

Submission status: Wrong Answer

Solution code:
word = input().upper()
ans = 0
while True:
    sent = input()
    if sent == 'END_OF_TEXT':
        break
    ans += sent.upper().count(word)
print(ans)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-

import sys

w = sys.stdin.readline().strip().lower()

num_w = 0

while True:
    s = sys.stdin.readline().strip()
    if s == 'END_OF_TEXT':
        break
    s = s.lower()
    num_w += s.count(w)

print(num_w)

Submission status: Wrong Answer

Solution code:
def find_a_word(w, t):
    return ' '.join(t).lower().count(w.lower())

if __name__ == '__main__':
    w = input()
    t = []
    while True:
        i = input()
        if i == 'END_OF_TEXT':
            break
        else:
            t.append(i)

    print(find_a_word(w, t))

Submission status: Wrong Answer

Solution code:
def find_a_word(w, t):
    return ''.join(t).lower().count(w.lower())

if __name__ == '__main__':
    w = input()
    t = []
    while True:
        i = input()
        if i == 'END_OF_TEXT':
            break
        else:
            t.append(i)

    print(find_a_word(w, t))

Submission status: Wrong Answer

Solution code:
w = input().lower()
s = ""
while True:
    t = input()
    if t == "END_OF_TEXT":
        break
    s += t.lower()
print(s.count(w))

Submission status: Wrong Answer

Solution code:
w = input()
small = 'abcdefghijklmnopqrstuvwxyz'
large = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
count = 0
while True:
    text = input()
    if text == 'END_OF_TEXT':
        break
    else:
        stext = ''
        for i in text:
            j = 0
            while j < 26:
                if i == large[j]:
                    stext += small[j]
                    break
                j += 1
            stext += i
        t = list(map(str, stext.split(' ')))
        for p in t:
            if p == w:
                count += 1
print(count)

Submission status: Wrong Answer

Solution code:
#coding: utf-8


w = input()
s = []
c = 0
while True:
    i = input()
    if i == "END_OF_TEXT":
        break
    s.append(i)

for i in s:
    c += i.count(w)

print(c)

Submission status: Wrong Answer

Solution code:
#coding: utf-8


w = input()
w = w.upper()
s = []
c = 0
while True:
    i = input()
    if i == "END_OF_TEXT":
        break
    s.append(i.upper())

for i in s:
    c += i.count(w)

print(c)

Submission status: Wrong Answer

Solution code:
w = input()
s = ""
while 1:
  t = input()
  if t == "END_OF_TEXT": break
  s += t
print(s.count(w))

Submission status: Wrong Answer

Solution code:
w = input().lower()
s = ""
while 1:
  t = input()
  if t == "END_OF_TEXT": break
  s += t.lower()
print(s.count(w))

Submission status: Wrong Answer

Solution code:
import sys

W = sys.stdin.readline().strip()
num = 0

while True:
    T = sys.stdin.readline().strip()
    if T == 'END_OF_TEXT':
        break
    T_line = T.split()
    for i in T_line:
        if W == i:
            num += 1

print(num,end='')

Submission status: Wrong Answer

Solution code:
import sys

l = []
for i in sys.stdin:
    l.append(i.split())

count = 0
for i in range(1,len(l)-1):
    count += l[i].count(l[0][0])

print(count)

Submission status: Wrong Answer

Solution code:
w = input().lower()
count = 0
while True:
    t = input()
    if t == 'END_OF_TEXT':
        break
    else:
        count += t.lower().count(w)
print(count)

Submission status: Wrong Answer

Solution code:
w = input()
count = 0
while True:
    t = input().upper()
    if t == 'END_OF_TEXT':
        break
    else:
        count += t.split().count(w)
print(count)

Submission status: Wrong Answer

Solution code:
string=[]
W = input()#単語入力
while True:
    T = input()#入力
    if T == 'END_OF_TEXT':#空入力のときループぬける
        break
    string.append(T)#list追加
count=0
for i in range(len(string)):
    string[i].lower()
    count+=string[i].count(W)
print(count)