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: Accepted

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

Submission status: Accepted

Solution code:
word = input().lower()
cnt = 0
while True:
	eot = input()
	if eot == 'END_OF_TEXT':
		break
	sent = eot.lower().split()
	if word in sent:
		cnt += sent.count(word)
print(cnt)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

w = str(input())
y = 0

while True:
    T = str(input())
    if T == "END_OF_TEXT":
        break
    t = T.lower().split()
    x = t.count(w)
    y = y + x
print(y)

Submission status: Accepted

Solution code:
P=str(input()).upper()
line=[]

while True:
    a_line=str(input())
    if a_line=='END_OF_TEXT':
        break
    line+=a_line.upper().split()

ans=0

for a_word in line:
    if a_word ==P:
        ans+=1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=input()
l=0
while True:
    a = input()
    if a=="END_OF_TEXT":
        break
    else:
        a=a.lower()
        l += a.split().count(n)
print(l)

Submission status: Accepted

Solution code:
A=0
W=str(input())
while True:
    t=str(input())
    if t=='END_OF_TEXT':
        break
    t=(t.lower().split())
    a=(t.count(W))
    A=A+a
print(A)

Submission status: Accepted

Solution code:
w=input()
t=input()

s = []
while t != "END_OF_TEXT":
	t=t.lower()
	s+=list(t.split())
	t=input()
	
for i in range(len(s)):
    n=s.count(w)
print(n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=input()
a=0
while True:
    s=input()
    if s == 'END_OF_TEXT':
        print(a)
        break
    else:
        x = s.lower()
        l = x.split()    #split()メソッドで単語ごとのリストに変換する
        b = l.count(n)
        a+=b

Submission status: Accepted

Solution code:
W = str(input())
co = 0
while True:
    T = input()
    if T == 'END_OF_TEXT':
        break
    
    W = W.upper()
    T = T.upper()
    co += T.split().count(W) #split()で空白区切りを考える

print(co)

Submission status: Accepted

Solution code:
w=str(input()).upper()
bun=[]
while True: 
    a=str(input())
    if 'END_OF_TEXT'==a:
        break
    bun+=a.upper().split()
count=0
for i in bun:
    if i==w:
        count+=1
print(count)

Submission status: Accepted

Solution code:
W = input()
w = W.upper()
y=0
while True:
    T = input()
    t = T.upper().split()
    if T=='END_OF_TEXT':
        break
    elif w in t:
        y += t.count(w)
    else:
        pass
print(y)

Submission status: Accepted

Solution code:
a=0
x=str(input())
while True:
    n=str(input())
    if n=='END_OF_TEXT':
        break
    n=(n.lower().split())
    N=(n.count(x))
    a=a+N
print(a)

Submission status: Accepted

Solution code:
w = input().upper()
t = ""
while True:
    tmp = input()
    if tmp == "END_OF_TEXT":
        break
    t += tmp.upper() + " "
list = t.split()
print(list.count(w))

Submission status: Accepted

Solution code:
A=0

B=str(input())

while True:
    C=str(input())
    
    if C=='END_OF_TEXT':
        break
    else:
        D=C.lower().split()
        E=(D.count(B))
        A+=E
        
print(A)

Submission status: Accepted

Solution code:
a=input()
b=[]
total=0
while True:
    c=input().strip(".").split()
    if c==["END_OF_TEXT"]:
        break
    else:
        b.append(c)
for i in range(len(b)):
    for j in b[i]:
        if a==j.lower():
            total+=1
print(total)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
pattern = input()
text = []
while True:
    tmp = input().split()
    if tmp[0] == "END_OF_TEXT":
        break
    text[len(text):len(text)] = tmp

count = 0
marks = "!\"#$%&'()*+,-./:;<=>?@[\]^_`{|}~"
for i in range(len(text)):
    
    trim = text[i].lower()
    for mark in marks:
        trim = trim.replace(mark, "")
    word = trim
    
    if word == pattern:
        count += 1
    
print(count)

Submission status: Accepted

Solution code:
target_word = input()

BREAK_CLAUSE = "END_OF_TEXT"
total_occurrences = 0

while True:
    text = input()
    
    if text == BREAK_CLAUSE:
        print(total_occurrences)
        break 
    
    text = text.split(" ")
    cleaned_text = [word.lower() for word in text]
    
    total_occurrences += cleaned_text.count(target_word)

Submission status: Accepted

Solution code:
s=input()
sm=0
while 1:
    text=input().split()
    if text==["END_OF_TEXT"] : break
    sm+=len([x for x in text if x.lower()==s])

print(sm)

Submission status: Accepted

Solution code:
W, *T = open(0).read().split()
ans = len([t for t in T if t.lower() == W.lower()])
print(ans)

Submission status: Accepted

Solution code:
W=input()
count=0
while True:
    T=input()
    if T=='END_OF_TEXT':
        break
    words = T.lower().split(' ')
    for word in words:
        if word==W:
            count+=1
print(count)

Submission status: Accepted

Solution code:
W=input()
W1=W.upper()
lst=[]
while True:
    T=input()
    if T=='END_OF_TEXT':
        break
    a=T.upper()
    b=a.split()
    lst.append(b.count(W1))
print(sum(lst))

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
#５７　単語の検索
w=str(input())
ans = 0
while 1:
  t =str(input())
  if t== "END_OF_TEXT":
    break
  else:
    ans += t.lower().split().count(w)
print(ans)

Submission status: Accepted

Solution code:
w = input().upper()
flg = True
count = 0

while flg:
    string = input().split()
    #print(string)
    
    if "END_OF_TEXT" in string:
        flg = False

    for i in range(len(string)):
        if w == string[i].upper():
            count += 1
        
        
print(count)

Submission status: Accepted

Solution code:
W=str(input())
c=[]
total=0
while True:
    T=str(input())
    if T=="END_OF_TEXT":
        break
    c += T.lower().split()
print(c.count(W))

Submission status: Accepted

Solution code:
a = str(input())
f = a.lower()
b = []
while True:
    n = input()
    e = n.lower()
    c = (e.split(' '))
    if n == "END_OF_TEXT":
        break
    b.append(c)

d = []
for l in b:
    for item in l:
        d.append(item)

print(d.count(f))

Submission status: Accepted

Solution code:
import sys
W=input()
print(sys.stdin.read().lower().split().count(W))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
W = input().replace("\r", "").replace("\n", "")
strings = []
while True:
    s = input().replace("\r", "").replace("\n", "")
    if s == "END_OF_TEXT":
        break

    for i in list(s.lower().split()):
        strings.append(i)

print(strings.count(W))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
W = input().lower()
ans = 0
while True:
    T = input()
    if T == "END_OF_TEXT":
        break
    ans+= T.lower().split().count(W)
print(ans)

Submission status: Accepted

Solution code:
import sys


def resolve():
    w = input()

    count = 0
    for line in sys.stdin:
        if line == "END_OF_TEXT\n":
            break

        words = map(lambda x: x.lower(), line.split())
        for word in words:
            if word == w:
                count += 1
    print(count)


resolve()

Submission status: Accepted

Solution code:
import sys

W = input()

T = sys.stdin.read()
#T = input()
#f = open("C:\\users\\inago\\desktop\\test.txt", mode="r")
#T = f.read()

T_word = T.split()
#print(T_word)

count = 0
for s in T_word:
    if s == "END_OF_TEXT":
        break
    
    target = s.lower()

    #print("count:%d,  target, W: %s, %s" % (count, target, W))
    if target == W:
        count += 1

print(count)

Submission status: Accepted

Solution code:
w = input()
ans = 0
while True:
    s = list(input().split())
    if s == ["END_OF_TEXT"]:
        break
    for t in s:
        if t.lower() == w:
            ans += 1

print(ans)

Submission status: Accepted

Solution code:
W=str(input())
Sw=list(W)
Sw.append(" ")
Sw.insert(0," ")
Lw=list(W.upper())
Lw.append(" ")
Lw.insert(0," ")
x=0
while True:
    T=str(input())
    if T=='END_OF_TEXT':
        break
    elif T.find(Sw[1])==-1 and T.find(Lw[1])==-1:
        pass
    else:
        t=list(T)
        t.append(" ")
        t.insert(0," ")
        for i in range(len(t)):
            if t[i]==Sw[0] or t[i]==Lw[0]:
                if i+len(Sw)>len(t):
                    break
                else:
                    for j in range(len(Sw)):
                        y=0
                        if t[i+j]!=Sw[j] and t[i+j]!=Lw[j]:
                            break
                        else:
                            y+=1
                    x+=y
print(x)

Submission status: Accepted

Solution code:
w = input()
count = 0

while True:
    t = input().split()
    if "END_OF_TEXT" in t:
        break
    count += list(map(str.lower, t)).count(w)

print(count)

Submission status: Accepted

Solution code:
l = []

str = input()
while True:
    txt = input()
    if txt == 'END_OF_TEXT':
        break
    x = txt.lower()
    X = x.split() #空白で区切ってリスト化
    l += X #リストlにリストXを結合していく
#print(l)
print(l.count(str))
#    p = ' '.join(l)
#print(p.count(str))

Submission status: Accepted

Solution code:
w = input()
lst=[]
while True:
    t_r = input()
    if t_r == 'END_OF_TEXT':
        break
    else:
        t_r = t_r.strip(',.\"\'')
        t_r = t_r.lower()
        lst.append(list(map(str, t_r.split())))
count = 0
for i in range(len(lst)):
    for v in lst[i]:
        if v == w:
            count += 1
print(count)

Submission status: Accepted

Solution code:
w=input().lower()
count=0
while True:
  s=input()
  if s=='END_OF_TEXT':
    break
  s=s.split(' ')
  for i in s:
    if i.replace('.','').lower()==w:
      count+=1

print(count)

Submission status: Accepted

Solution code:
tg = str(input())
cnt = 0
while True:
    t = str(input())
    p = 0
    if t == 'END_OF_TEXT':
        break
    for a in t.split(' '):
        if a.lower() == tg:
            cnt += 1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
W = str(input())
x = 0
while True:
    T = str(input())
    if T == 'END_OF_TEXT':
        break
    T1 = T.lower()
    T2 = T1.split()
    x += T2.count(W)
print(x)

Submission status: Accepted

Solution code:
W = input()
a = 0
while True:
    T = input()
    x = T.lower()
    y = x.split(' ')
    z = y.count(W)
    if T==("END_OF_TEXT"):
        break
    a = a + z
print(a)

Submission status: Accepted

Solution code:
#57 単語の検索

W = input().upper()

ans = 0
while True:
        T = input()
        if T == "END_OF_TEXT":
                break
        ans += T.upper().split().count(W)
print(ans)

Submission status: Accepted

Solution code:
w = input()
w.lower()
cnt = []
while True:
    s = input()
    if s == "END_OF_TEXT":
        break
    cnt.extend([words.lower() for words in s.split()])
print(cnt.count(w))

Submission status: Accepted

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

def main():
    find_word=input()
    text=[]
    counter=0
    while True:
        text=input()
        if text =="END_OF_TEXT":
            break
        text=text.lower()
        for string in text.split():
            if string==find_word:
                counter+=1
    print(counter)

if __name__=="__main__":
    main()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline


S = input().strip()
words = []

while True:
    line = input().strip()
    if line == "END_OF_TEXT":
        break
    w = [word.lower() for word in line.split()]
    words += w

ans = 0

for word in words:
    if word == S:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
T = input()
cnt = 0
while True:

    try:
        cnt += input().lower().split().count(T)
    except:
        break
print(cnt)

Submission status: Accepted

Solution code:

w = input()
t = []
count = 0

while True:
    t.extend(input().split())
    if t[len(t) - 1] == "END_OF_TEXT":
        break

i = 0
for i in range(len(t)):
    if w.lower() == t[i].lower():
        count += 1

print(count)

Submission status: Accepted

Solution code:
count = 0
search_word = None
while True:
    line = input()
    if line == "END_OF_TEXT":
        break
    
    if search_word is None:
        search_word = line
        continue
    
    for word in line.split():
        word = word.lower()
        if search_word == word:
            count += 1
print(count)

Submission status: Accepted

Solution code:
m=0
W=input()
while True:
    a=input()
    n=a.lower().split()
    list(n)
    if a=="END_OF_TEXT":
        break
    k=n.count(W)
    m=m+k
    
print(m)

Submission status: Accepted

Solution code:
i,cou=0,0
sent=[]
word=input()

while True:
    for w in input().split():
        sent.append(w.lower())
        check = w
    if check == "END_OF_TEXT":
        break



print(sent.count(word))

Submission status: Accepted

Solution code:
w = input()
t = input()
s = []
while t != "END_OF_TEXT":
	t = t.lower()
	s += list(t.split())
	t = input()
n = 0
for i in range(len(s)):
	if s[i] == w:
		n += 1
print(n)

Submission status: Accepted

Solution code:
import sys
w=input()
t=sys.stdin.read()
print(t.lower().split().count(w))

Submission status: Accepted

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

while True:
  s = input()

  if s == "END_OF_TEXT":
    break

  s = s.upper().split()

  ans += s.count(w)

print(ans)

Submission status: Accepted

Solution code:
import sys

w = input()
p = sys.stdin
count = 0

for line in p:
    x = line.lower().split().count(w)
    count += x
print(count)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

W = input()
n = 0
while True :
    T = input()
    if T== "END_OF_TEXT" :
        break
    small_T = list(T.split())
    for i in range(len(small_T)) :
        if str.lower(small_T[i]) == str.lower(W) :
            n += 1
print(n)

Submission status: Accepted

Solution code:
x=0
w=input()
while True:
    y=[]
    t=list(input().split())
    
    
    if t[0]=='END_OF_TEXT':
        break
    
    #print(t)
    
    for i in range(len(t)):
        y.append(t[i].lower())
    #print(y)
    
    for j in range(len(t)):
        if y[j]==w:
            x+=1
print(x)

Submission status: Accepted

Solution code:
W = input()

count = 0
while True:
    input_str = input()
    if input_str == "END_OF_TEXT":
        break
    S = [s.lower() for s in input_str.split(" ")]
    count += S.count(W)

print(count)

Submission status: Accepted

Solution code:
# coding: utf-8

count = 0
W = input().lower()

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

print(count)

Submission status: Accepted

Solution code:
w = input().lower()
count = 0
while True:
    s = input()
    if s == 'END_OF_TEXT':
        break
    count += s.lower().split().count(w)

print(count)

Submission status: Accepted

Solution code:
w = input()
W = w.upper()
d = []
while True:
    t = input()
    if t == 'END_OF_TEXT':
        break
    n = t.upper()
    a = n.split()
    d += a
c = d.count(W)
print(c)

Submission status: Accepted

Solution code:
W = input()
count = 0
while True:
    T = input().split()
    if T[0] == "END_OF_TEXT":
        break
    for i in T:
        if i == W or i.lower() == W:
            count += 1
print(count)

Submission status: Accepted

Solution code:
check = input().upper()
count = 0

while True:
    strs = input()
    if strs == 'END_OF_TEXT':
        break
    count += strs.upper().split().count(check)

print(count)

Submission status: Accepted

Solution code:
word = str(input())
# print(word)

counter = 0
while True:
    list_s = [str(_) for _ in input().split(" ")]
    # print(list_s)
    if "END_OF_TEXT" in list_s:
        break
    
    for s in list_s:
        # print(s)
        if s.lower() == word:
            counter += 1
            # print(f"  -> OK! ({counter})")
            
    
print(counter)

Submission status: Accepted

Solution code:
l = []
res = 0
w = input()
while True:
    temp = input()
    if temp[-1] == '.':
        temp = temp[:-1]
    if temp =='END_OF_TEXT':
        break
    l.append(temp.split())
for i in l:
    for j in i:
        if w == j.lower():
            res += 1
print(res)

Submission status: Accepted

Solution code:
W = input()
T = []
while True:
    t = input().split()
    if t[0] == 'END_OF_TEXT':
        break
    T += [c.lower() for c in t]
print(T.count(W))

Submission status: Accepted

Solution code:
W=str.lower(input())
a=len(W)
if a<=10:
    sum=0

    while True:
        T=input()
        if T=="END_OF_TEXT":
            break
        if len(T)<=1000:
            T=str.lower(T)
            T=T.split()
            x=T.count(W)
            sum+=x
print(sum)

Submission status: Accepted

Solution code:
w = input()
t = input()
s = []
while t != "END_OF_TEXT":
	t = t.lower()
	s += list(t.split())
	t = input()
n = 0
for i in range(len(s)):
	if s[i] == w:
		n += 1
print(n)

Submission status: Accepted

Solution code:
search = input()

t = []
while(True):
  line = input()
  if (line == "END_OF_TEXT") :
    break
  
  line = [l for l in line.split()]
  
  for l in line:
    t.append(l.lower())

count = 0
for i in t:
  if (i == search):
    count += 1
    
print(count)

Submission status: Accepted

Solution code:
W= input().lower()
ans = 0
while True:
    T = input()
    if T == "END_OF_TEXT":
        break
    ans += T.lower().split().count(W)
print(ans)

Submission status: Accepted

Solution code:
s=input()
sum=0
while True:
    try:
        l=input().split()
        if l=="END_OF_TEXT" :break
        for i in range(len(l)):
            l[i]=l[i].lower()
            if s==l[i] : sum+=1
    except EOFError : break
print(sum)

Submission status: Accepted

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

while True:
    s=input()
    if s=='END_OF_TEXT':
        break
    s=s.upper().split()
    ans+=s.count(W)
print(ans)

Submission status: Accepted

Solution code:
w = input()
string = []
while True:
  try:
    str_list = (input().lower()).split()
    for i in str_list:
      string.append(i)
  except EOFError:
    break
print(string.count(w))

Submission status: Accepted

Solution code:
S = 0
W = input()

while True:
    T = input()
    if T == 'END_OF_TEXT':
        break
    else:
        T = T.lower().split()
        s = T.count(W)
        S = S+s
    
print(S)

Submission status: Accepted

Solution code:
w = input()
t = ''
while True:
    tmp = input()
    if tmp == 'END_OF_TEXT':
        break
    else:
        t = t + tmp + ' '
        
l = t.lower().replace('.', '').split()
print(l.count(w))

Submission status: Accepted

Solution code:
s = input()
ans = 0
while True:
    t = input()
    if t == "END_OF_TEXT":
        break
    ans += list(map(lambda x : x.lower(), t.split())).count(s.lower())
print(ans)

Submission status: Accepted

Solution code:
a = input()
c = []
while True:
    b = list((input()).split(' '))
    if "END_OF_TEXT" == b[0]:
        break
    for i in b:
        c.append(str.lower(i))
x = 0
for j in c:
    if j == a:
        x = x + 1
print(x)

Submission status: Accepted

Solution code:
w = input()
T = []
c = 0
while True:
    t = input()
    if t == "END_OF_TEXT":
        break
    T.append(t.split())

for t in T:
    for i in t:
        if i.lower() == w:
            c += 1
print(c)

Submission status: Accepted

Solution code:
W = input()
count = 0
while True:
    T = input().split()
    if 'END_OF_TEXT' in T:
        break
    LT = list(map(str.lower,T))
    for i in range(len(LT)):
        if W == LT[i]:
            count += 1
print(count)

Submission status: Accepted

Solution code:
count=0
w=input().lower()
while True:
    t = input().split()
    if t[0] == "END_OF_TEXT":
        break
    for tl in t:
        if tl.lower() == w:
            count+=1
    
print(count)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
x=0
n=str(input())
l=n.lower()
m=n.upper()
o=list(l)
S=[]
p=list(m)
T=[]
for i in range (len(o)):
    o[i]=o[i].upper()
    o[i-1]=o[i-1].lower()
    s = ''.join(o)
    S.append(s)
for j in range (len(o)):
    p[j]=p[j].lower()
    p[j-1]=p[j-1].upper()
    t=''.join(p)
    T.append(t)
while True:
    try:
        a=list(input().split())
        x+=a.count(l)
        x+=a.count(m)
        if len(S)>=2:
            for b in range (len(S)):
                x+=a.count(S[b])
        if len(T)>=2:
            for c in range (len(T)):
                x+=a.count(T[c])


    except:
        break;
print(x)

Submission status: Accepted

Solution code:
W = input().lower()
words = []
while True:
    sentence = input()
    if sentence == 'END_OF_TEXT':
        break
    else:
        words += sentence.lower().split()
print(words.count(W))

Submission status: Accepted

Solution code:
W = input().lower()
line = []
while True:
    temporary = input()
    if temporary == 'END_OF_TEXT': break
    line += temporary.lower().split()
ans = 0
for l in range(len(line)):
    if line[l] == W:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
import sys
x=input()
y=sys.stdin.read()
print(y.lower().split().count(x))

Submission status: Accepted

Solution code:
import sys
N = input()
N = N.upper()
count = 0
while True:
  S = sys.stdin.readline().split()
  if S[0] == "END_OF_TEXT":
    break
  else:
    S = list(map(str.upper,S))
    count += S.count(N)
print(count)

Submission status: Accepted

Solution code:
W = input().lower()
ans=0
while True:
  T = input()
  if T == "END_OF_TEXT":
    break
  ans += T.lower().split().count(W)

print(ans)

Submission status: Accepted

Solution code:
W=input().lower()
x=0
while True:
    T=input()
    if T=="END_OF_TEXT":
        break
    T=T.lower().split()
    x+=T.count(W)
print(x)

Submission status: Accepted

Solution code:
W = input().lower()
ans = 0
while True:
    T = input()
    if T == "END_OF_TEXT":
        break
    ans += T.lower().split().count(W)
print(ans)

Submission status: Accepted

Solution code:
W = input()
cnt = 0

while True:
    T = input()
    if T == 'END_OF_TEXT': break
    cnt += T.lower().split().count(W)
print(cnt)

Submission status: Accepted

Solution code:
import sys

w = input()
t = ""
for l in sys.stdin:
    if l == "END_OF_TEXT\n":
        break
    t += str(l).lower()

arrt = t.replace("\n", " ").split(" ")
print(arrt.count(w))

Submission status: Accepted

Solution code:
W=input()
w=W.lower()
n=0

while True:
    t=input()
    
    if t=="END_OF_TEXT":
        break
    
    tl=t.lower()
    tls=tl.split()
    n+=tls.count(w)
    
print(n)

Submission status: Accepted

Solution code:
import sys

W = str(input())
T = sys.stdin.read().lower().split()
print(T.count(W))

Submission status: Accepted

Solution code:
W = 0 
T = input()
#print(T)
while 1:
    txt = input()
    if txt == 'END_OF_TEXT':
        break
    
   
    txt = txt.lower()
    Txt = list(txt.split())
    #print(Txt)
    
    W = W + Txt.count(T)
print(W)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
W = input()
W = W.upper()


count = 0 
while True:
    T = input()
    if T == "END_OF_TEXT":
        break
    T = T.upper()
    T = T.split()

    for word in T:
        if word == W:
            count += 1

print(count)

Submission status: Accepted

Solution code:
W = input().lower()
count = 0
while True:
    T = input()
    if T == "END_OF_TEXT":
        break
    count += T.lower().split().count(W)
print(count)

Submission status: Accepted

Solution code:
n = input().upper()
a = 0
b = []
while True:
    text = input()
    if text == 'END_OF_TEXT':
        break
    c = text.upper().split()
    for i in c:
        if n == i:
            a += 1
print(a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
t=str(input()).upper()
line=[]
con=0

while True:
    tmp_line=str(input())
    if tmp_line=='END_OF_TEXT':
        break
    line+=tmp_line.upper().split()

for tmp_word in line:
    if tmp_word==t:
        con+=1

print(con)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
from sys import stdin

W = stdin.readline().rstrip()

sum = 0
while True:
  T = stdin.readline().rstrip()
  if T == 'END_OF_TEXT':
    break
  T = T.split()
  sum += len([s for s in T if s.lower() == W])
print(sum)

Submission status: Accepted

Solution code:
t = str(input()).lower()
n = 0
while True:
    w = list(map(str,input().split()))
    if w[0] == 'END_OF_TEXT':
             break
    w = list(map(str.lower,w))
    n += w.count(t)
print(n)

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

def main():
    text = ""
    word = input().rstrip().lower()
    count = 0
    while True:
        s = input().rstrip()
        if s == "END_OF_TEXT":
            break
        s = s.lower().split()
        count += s.count(word)
    
    print(count)
    
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def run():
    query=input()
    
    text_list=[]
    
    while True:
        line=input()
        
        if line=="END_OF_TEXT":
            break
        
        text_list.append(line)
        
    n=0
    for text in text_list:
        word_list=text.split()
        for w in word_list:
            
            if w.lower() == query:
                n+=1
            
    print(n)

run()

Submission status: Accepted

Solution code:
import sys

W = input().upper()
T = sys.stdin.readlines()

result = 0

for line in T:
    line = line.upper()
    if line == "END_OF_TEXT":
        break

    words = line.split()

    for word in words:
        if word == W:
            result += 1

print(result)

Submission status: Accepted

Solution code:
W=input()
s=0
try:
    while True:
        T=list(input().split())
        l=len(T)
        for i in range(l):
            if T[i]=="END_OF_TEXT":
                break
            else:
                t=T[i].lower()
                if t==W:
                    s+=1
                
except EOFError:
    pass
print(s)

Submission status: Accepted

Solution code:
word=input().lower()
sent=[]
while True:
	tmp=input()
	
	if ("END_OF_TEXT" in tmp) ==True:
		break
	tmp=tmp.split(' ')
	sent.append(tmp)
	

sent=sum(sent,[])
sent= list(map(lambda x:x.lower(),sent))
# print(sent)
c=sent.count(word)

print(c)

Submission status: Accepted

Solution code:
count = 0
w = input()

while True:
    t = input()
    if t == 'END_OF_TEXT':
        break
    t = t.lower().split()
    count += t.count(w)

print(count)

Submission status: Accepted

Solution code:
W = input()

T = ""

while True:
    t = input()
    if t == "END_OF_TEXT":
        break
    else:
        T += t.lower() + " "

Tl = T.split()

print(Tl.count(W))

Submission status: Accepted

Solution code:
import sys

word=input()
text=sys.stdin.read()

print(text.lower().split().count(word))

Submission status: Accepted

Solution code:
W=input()
a=0
while True:
    T=input()
    if T == "END_OF_TEXT": break
    a += T.lower().split().count(W)
print(a)

Submission status: Accepted

Solution code:
target=str(input())
cnt=0
while True:
    T=str(input())
    if T=='END_OF_TEXT':
        break
    count=0

    for i in T.lower().split():
        if i==target:
            cnt+=1

print(cnt)

Submission status: Accepted

Solution code:
W = input()
W = W.lower()
ans = 0
for i in range(10**5):
    S = input()
    if S == "END_OF_TEXT":
        break
    else:
        T = S.lower()
        T = T.split()
        ans += T.count(W)
print(ans)

Submission status: Accepted

Solution code:
w = input()
w = w.lower()

cnt = 0

while True:
    t = input().split()
    if "END_OF_TEXT" in t:
        break

    for i in range(len(t)):
        if w == t[i].lower():
            cnt+=1

print(cnt)

Submission status: Accepted

Solution code:
W = input()
S = []
while True:
    S_tmp = input()
    if S_tmp == 'END_OF_TEXT': break
    S += S_tmp.lower().replace('.', ' .').split(' ')

ans = 0
for s in S:
    if W==s:
        ans += 1
    
print(ans)

Submission status: Accepted

Solution code:
import sys
n=input()

print(sys.stdin.read().lower().split().count(n))

Submission status: Accepted

Solution code:
W=input()
c=0
while True:
    T=input()
    if T=="END_OF_TEXT":
        break
    else:
        t=T.lower().split()
        c+=t.count(W)
print(c)

Submission status: Accepted

Solution code:

W = input()

S = ''
while True:
    a = input()
    if a == 'END_OF_TEXT':
        break
    S += a.lower() + ' '

S = S.split()

a = 0
for i in range(len(S)):
    if S[i] == W:
        a += 1
print(a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#1_9_A
import re
cnt = 0
c = 0
n = str(input())
while True:
    l = str(input())
    if l == 'END_OF_TEXT':
        break
    x = l.lower()
    y = x.split()
    c += y.count(n)
print(c)

Submission status: Accepted

Solution code:
w = input()
cnt = 0
while True:
    str = input()
    if str == 'END_OF_TEXT':
        break
    str = str.lower()
    lst = str.split()

    #print(str)
    #print(lst)

    for i in range(len(lst)):
        if w == lst[i]:
            cnt += 1

print(cnt)

Submission status: Accepted

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

a = 0

while True:
    s = input()

    if s == "END_OF_TEXT":
        break

    s = s.upper()
    s = s.split()

    for i in range(len(s)):
        if s[i]==w:
            a+= 1

print(a)