Problem:


Score : 300 points

Problem Statement

You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.

How many kinds of items did you get?

Constraints

1 \leq N \leq 2\times 10^5

S_i consists of lowercase English letters and has a length between 1 and 10 (inclusive).

Input

Input is given from Standard Input in the following format:

N
S_1
:
S_N

Output

Print the number of kinds of items you got.

Sample Input 1

3
apple
orange
apple

Sample Output 1

2

You got two kinds of items: apple and orange.

Sample Input 2

5
grape
grape
grape
grape
grape

Sample Output 2

1

Sample Input 3

4
aaaa
a
aaa
aa

Sample Output 3

4



Sample input:
3
apple
orange
apple


Sample output:
2

Submission status: Accepted

Solution code:
N = int(input()) 
s = [input() for i in range(N)] 
print(len(set(s)))

Submission status: Accepted

Solution code:
import collections

N = int(input())
S = [input() for i in range(N)]
c = collections.Counter(S)

ans = []
for i in c:
  ans.append(i)
  
print(len(ans))

Submission status: Accepted

Solution code:
n = int(input())
s=[]
for x in range(n):
    s.append(input())
print(len(set(s)))

Submission status: Accepted

Solution code:
N = int(input())
d = [input() for i in range(N)]
print(len(set(d)))
print()

Submission status: Accepted

Solution code:
N = int(input())
S = [str(input().split()) for _ in range(N)]
UniqueS = set(S)
print(len(UniqueS))

Submission status: Accepted

Solution code:
n=int(input())
s=[0]*n
for i in range(n):
    s[i]=input()
new_s_list=list(set(s))
print(len(new_s_list))

Submission status: Accepted

Solution code:
N = int(input())
S_tuple =[]
for i in range(N):
	S = str(input())
	S_tuple.append(S)

import collections

S_count= collections.Counter(S_tuple)
print(len(S_count.keys()))

Submission status: Accepted

Solution code:
n = int(input())
gifts = set([])
for i in range(n):
    gift = input()
    gifts.add(gift)
print(len(gifts))

Submission status: Accepted

Solution code:
n=int(input())

li = []

for i in range(n):
    a=input()
    li.append((a,i))

di=dict(li)

#print(di)
print(len(di))

Submission status: Accepted

Solution code:
import collections

n = int(input())

s = []
for _ in range(n):
    s_ = input('')
    s.append(s_)

c = collections.Counter(s)
print(len(c))

Submission status: Accepted

Solution code:
N = int(input())
dict = {}
for i in range(N):
	dict[input()] = 1
	
print(len(dict))

Submission status: Accepted

Solution code:
n = int(input())
item = [str(input()) for _ in range(n)]

print(len(set(item)))

Submission status: Accepted

Solution code:
n = int(input())
sum = 0
l = set()
for _ in range(0,n):
    s = input()
    if s in l:
        continue
    else:
        l.add(s)
        sum += 1

print(sum)

Submission status: Accepted

Solution code:
from sys import stdin, stdout  
def main(): 
	n = int(stdin.readline().rstrip())
	elements = set()
	for i in range(n):
		elem = stdin.readline().rstrip()
		elements.add(elem)
	stdout.write(str(len(elements)) + '\n')
if __name__ == "__main__": 
	main()

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
i = 0

list = []
for i in range(N):
    list.append(input())
    i += 1

unique = np.unique(list)
print(len(unique))

Submission status: Accepted

Solution code:
n=int(input())
l=[]
for i in range(0,n):
    l.append(input())
print(len(set(l)))

Submission status: Accepted

Solution code:
import collections
n = int(input())
a =[]
for i in range(0,n):
  j = input()
  a.append(j)

c = collections.Counter(a)
print(len(c))

Submission status: Accepted

Solution code:
prize = set()

n = int(input())

for i in range(n):
    prize.add(input())

    
print(len(prize))

Submission status: Accepted

Solution code:
N = int(input())

S = []
for i in range(N):
  S.append(input())
  
  
new_S = list(set(S))

print(len(new_S))

Submission status: Accepted

Solution code:
#n
n=int(input())

#s
s = []

for i in range(n):
    s.append(input())

ans=set(s)
print(len(ans))

Submission status: Accepted

Solution code:
N = int(input())
s = [input() for i in range(N)]
sets = (list(set(s)))
int_list = []
str_list = []
for set_ in sets:
    try:
        int_list.append(int(set_))
    except ValueError:
        str_list.append(set_)
print(len(str_list))

Submission status: Accepted

Solution code:
from collections import Counter
S=[]
for i in range(int(input())):
  S.append(input())
d=Counter(S)
print(len(d))

Submission status: Accepted

Solution code:
import collections
N = int(input())
li = []
for i in range(N):
    S = input()
    li.append(S)
item = collections.Counter(li)
print(len(item))

Submission status: Accepted

Solution code:
N = int(input())
SN = [input() for _ in range(0, N)]
print(len(set(list(SN))))

Submission status: Accepted

Solution code:
n=int(input())
s=[]
for i in range(n):
  s.append(input())
  
print(len(set(s)))

Submission status: Accepted

Solution code:
a=int(input())
l=[]
for _ in range(a):
    l.append(input())
l=set(l)
print(len(l))

Submission status: Accepted

Solution code:
a = [input() for N in range(int(input()))]

print(len(set(a)))

Submission status: Accepted

Solution code:
N=int(input())
S = [str(input()) for i in range(N)]
print(len(set(S)))

Submission status: Accepted

Solution code:
import collections
N = int(input())
S = [str(input()) for i in range(N)]
a = collections.Counter(S)
print(len(a))

Submission status: Accepted

Solution code:
n = int(input())

s = []

for i in range(n):
  s.append(input())

s = set(s)

print(len(s))

Submission status: Accepted

Solution code:

import collections

N= int(input())
S = []
for _ in range(N):
    S.append(input())

c = collections.Counter(S)
print(len(c))

Submission status: Accepted

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


N = int(input())
S = [input() for i in range(1,N+1)]

S_1 = list(set(S))
print(len(S_1))

Submission status: Accepted

Solution code:
from collections import Counter
n=int(input())
list=[]
for i in range(n):
  list.append(input())
a=Counter(list)
print(len(a))

Submission status: Accepted

Solution code:
n = int(input())

str_set = set([ input() for i in range(n) ])
print(len(str_set))

Submission status: Accepted

Solution code:
n=int(input())
dic={}
for i in range(n):
    tmp=input()
    if tmp not in dic.keys():
        dic[tmp]=1
print(len(dic))

Submission status: Accepted

Solution code:

class abc_164:
    
    def __init__(self):
        pass
    
    def A(self):
        sw=list(map(int,input().split()))
        print("unsafe") if sw[1]>=sw[0] else print("safe")
    
    def B(self):
        abcd=list(map(int,input().split()))
        while(abcd[0]!=0 and abcd[2]!=0):
            abcd[2]=abcd[2]-abcd[1]
            abcd[0]=abcd[0]-abcd[3]
            
            if abcd[2]<=0:
                print("Yes")
                break
            elif abcd[0]<=0:
                print("No")
                break
            else:
                pass
            
    def C(self):
        N=int(input())
        S = [input() for i in range(N)]
        print(len(list(set(S))))
    
    def D(self):
        pass
    
    def E(self):
        pass
    
    def F(self):
        pass
    
    
if __name__=='__main__':
    obj=abc_164()
    obj.C()

Submission status: Accepted

Solution code:
N = int(input())
import sys
lines = sys.stdin.read().splitlines()

s = set(lines)

lens= len(s)
print (lens)

Submission status: Accepted

Solution code:
N = int(input())
S = []
for c in range(N):
    S.append(input())

S = set(S)
print(len(S))

Submission status: Accepted

Solution code:
n=int(input())
a=[0]*n

for i in range(n):
    a[i]=input()
a=sorted(a)
ans=1
for i in range(n-1):
    if a[i]!=a[i+1]:
        ans+=1
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
kei =[]
for i in range(N):
    s = input()
    kei.append(s)
kei.sort()
t=kei[0]
count=1
for i in range(0,N):
    if(kei[i] != t):
        count+=1
        t = kei[i]
print(count)

Submission status: Accepted

Solution code:
b=int(input())
l = {input() for _ in range(b)}
print(len(l))

Submission status: Accepted

Solution code:

n = int(input())
lis = []
for i in range(n):
    a=input()
    lis.append(a)
print(len(set(lis)))

Submission status: Accepted

Solution code:
n = int(input())
l = list()
for i in range(n):
    l.append(input())
print(len(set(l)))

Submission status: Accepted

Solution code:
N = int(input())
l = []
for _ in range(N):
    l.append(input())

print(len(set(l)))

Submission status: Accepted

Solution code:
N=int(input())
lis=[]
ans=0
for i in range(N):
	lis+=[input()]
print(len(set(lis)))

Submission status: Accepted

Solution code:
n = int(input())
k =set([input() for _ in range(n)])
print(len(k))

Submission status: Accepted

Solution code:
n = int(input())
s = set(input() for i in range(n))

print(len(s))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# coding: utf-8
# def debug(arg):
#     if __debug__:
#         pass
#     else:
#         import sys
#         print(arg, file=sys.stderr)

def main():
    N = int(input())
    c = set()
    for i in range(0, N):
        c.add(input())
    print(len(c))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a=[]
for i in range(int(input())):
    a.append(input())

# print(a)

s=set(a)
print(len(s))

# n=int(input())
# a=list(input().split())
# print(a)

Submission status: Accepted

Solution code:
import collections

n = int(input())
result = []
for _ in range(n) :
    thing = input()
    result += [thing]
print(len(collections.Counter(result)))

Submission status: Accepted

Solution code:
# Nの入力
N = int(input())

# S_array(S1,S2,...Sn)の初期化
S_array = []

# S_arrayの入力
for i in range(N):
    S_array.append(input())

# setで重複を省いて、何種類を表示
print(len(set(S_array)))

Submission status: Accepted

Solution code:
N=int(input())
list=[]
new_list=[]
for i in range(0,N):
    item=input()
    list.append(item)
list.sort()
for i in range(0,N):
    if i==N-1:
        new_list.append(list[i])
    elif list[i]==list[i+1]:
        pass
    else:
        new_list.append(list[i])
print(len(new_list))

Submission status: Accepted

Solution code:
n = int(input())
collections = {}
ans = 0

for _ in range(n):
  s = input()
  collections[s] = 1


print(sum(collections.values()))

Submission status: Accepted

Solution code:
N = int(input())
S=[]
while N>0:
    s=input()
    S.append(s)
    N=N-1

print(len(set(S)))

Submission status: Accepted

Solution code:
N = int(input())
ans = set([input() for n in range(N)])
print(len(ans))

Submission status: Accepted

Solution code:
table = []
n = int(input())
for i in range (n):
    s = input()
    table.append(s)
print(len(list(set(table))))

Submission status: Accepted

Solution code:
N = int(input())

li = []

for i in range(N):
    li.append(str(input()))
    
print(len(set(li)))

Submission status: Accepted

Solution code:
N = int(input())
Ss = set()
while N > 0:
    s = input()
    if s not in Ss:
        Ss.add(s)
    N = N -1

print(len(Ss))

Submission status: Accepted

Solution code:
import collections

n = int(input())  # nは入力回数
str_list = [input() for _ in range(n)]

c = collections.Counter(str_list)
print(len(c))

Submission status: Accepted

Solution code:
n = int(input())
s = set()
for i in range(n):
  s.add(input())

print(len(s))

Submission status: Accepted

Solution code:
N = int(input())
lResult = [input() for i in range(N)]

gain = list(set(lResult))

print(len(gain))

Submission status: Accepted

Solution code:
N=int(input())
S=[input() for n in range(N)]

S.sort()

i=1
prev=S[0]
for e in S:
    if prev!=e:
        i+=1
    prev=e

print(i)

Submission status: Accepted

Solution code:
n=int(input())
l=[]
for i in range(n):
  l.append(input())
print(len(set(l)))

Submission status: Accepted

Solution code:
N = int(input())
S = {}
for i in range(N):
  new = input()
  if not(new in S):
    S[new]=1

print(len(S))

Submission status: Accepted

Solution code:
import collections
a=int(input())
n=list([input() for i in range(a)])
b=collections.Counter(n)
c,values=zip(*b.most_common())
d=list(values)
print(len(d))

Submission status: Accepted

Solution code:
n=int(input())
s=[]
ans=[0]*n
for i in range(n):
  s.append(input())

print(len(set(s)))

Submission status: Accepted

Solution code:
n=int(input())
s=[]
for i in range(n):
    s.append(input())

s=list(set(s))
print(len(s))

Submission status: Accepted

Solution code:
N=int(input())
S=[]
for i in range(N):
  S.append(str(input()))
print(len(set(S)))

Submission status: Accepted

Solution code:
import collections

N = int(input())
s = [input() for i in range(N)]
h = collections.Counter(s)
print(len(h))

Submission status: Accepted

Solution code:
def main():
    args = input().rstrip().split(' ')
    N = int(args[0])
    item_list = {}
    for i in range(N):
        item = input().rstrip()
        if(item in item_list):
            item_list[item] += 1
        else:
            item_list[item] = 0
    print(len(item_list))
    
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())
lst = [input() for _ in range(N)]

print(len(set(lst)))

Submission status: Accepted

Solution code:
n = int(input())

l = list()
for num in range (1,n+1):
    l.append(input())

print(len(set(l)))

Submission status: Accepted

Solution code:
N = int(input())
S = [input() for i in range(N)]
S_set = set(S)
print(len(S_set))

Submission status: Accepted

Solution code:
n = int(input())
x = {0}
for i in range(n):
    s = str(input())
    if s in x:
        n -= 1
    else:
        x.add(s)
print(n)

Submission status: Accepted

Solution code:
N=int(input())
listA=[input() for i in range(N)]
listB=set(listA)
print(len(listB))

Submission status: Accepted

Solution code:
l=[]
for _ in range(int(input())):
    l.append(input())
print(len(set(l)))

Submission status: Accepted

Solution code:
from collections import Counter
N=input()
S=[]
for i in range(int(N)):
  A=input()
  S.append(A)
c = Counter(S)
print(len(c))

Submission status: Accepted

Solution code:
n=int(input())
ansl=[]
for i in range(n):
  ansl.append(input().rstrip())
print(len(set(ansl)))

Submission status: Accepted

Solution code:
N = int(input())
# N = 3

items = set()

for i in range(0, N) :
    items.add(str(input()))
    # items.add(str("apple"))
    # print(newItem)

print(len(items)) # don't forget print()!

Submission status: Accepted

Solution code:
n = int(input())
ans = len(set([input() for i in range(n)]))
print(ans)

Submission status: Accepted

Solution code:
n=int(input())
alpha=[chr(i) for i in range(97, 97+26)]
d={i:[{0},{0},{0},{0},{0},{0},{0},{0},{0},{0}] for i in alpha}
ans=0
for _ in range(n):
    s=input()
    if s not in d[s[0]][len(s)-1]:
        d[s[0]][len(s)-1]|={s}
        ans+=1
print(ans)

Submission status: Accepted

Solution code:
n=int(input())
s=set()
for _ in range(n):
  s |= {input()}
  
print(len(s))

Submission status: Accepted

Solution code:
N=int(input())
list=[]
for i in range(N):
    list.append(input())
    
    
import collections
print(len(collections.Counter(list)))

Submission status: Accepted

Solution code:
num = int(input())
list1=[]
for i in range(num):
    words = str(input())
    list1.append(words)
setlist= set(list1)
print(len(setlist))

Submission status: Accepted

Solution code:
N=int(input())
list=[input() for i in range(N)]
list.sort()
n=1
s=list[0]
for i in range(N):
  if list[i] != s:
    n+=1
    s=list[i]
print(n)

Submission status: Accepted

Solution code:
A = int(input())
S = [input() for i in range(A)]
print(len(set(S)))

Submission status: Accepted

Solution code:
a = int(input())
b = []
for i in range(a):
    b.append(input())
print(len(set(b)))

Submission status: Accepted

Solution code:
n = int(input())
A = set()

for i in range(n):
    A.add(str(input()))

print(len(A))

Submission status: Accepted

Solution code:
n = int(input())
my_drew = set()
while n:
  n-=1
  my_drew.add(input())
print(len(my_drew))

Submission status: Accepted

Solution code:
n = int(input())
s = []
for i in range(n):
  s.append(input())
s_unique = list(set(s))
print(len(s_unique))

Submission status: Accepted

Solution code:
import collections

n = int(input())
li = [input() for i in range(n)]

cnt = collections.Counter(li)
print(len(cnt))

Submission status: Accepted

Solution code:
def q3():
    N = int(input())
    S = []
    for i in range(N):
        S.append(input())
    print(len(set(S)))


if __name__ == '__main__':
    q3()

Submission status: Accepted

Solution code:
import collections
a = int(input())
get = [input() for _ in range(a)]
b = list(get)
c = collections.Counter(b)
print(len(c))

Submission status: Accepted

Solution code:
n=int(input())
l=[]
for i in range(n):
  s=input()
  l.append(s)

l=set(l)
print(len(l))

Submission status: Accepted

Solution code:
l = []
for _ in range(int(input())):
    cad = input()
    l.append(cad)
print(len(set(l)))

Submission status: Accepted

Solution code:
def resolve():
    n=int(input())
    s = [input() for _ in range(n)]
    print(len(set(s)))
resolve()

Submission status: Accepted

Solution code:
N = int(input())
S = []
for i in range(N):
    s = input()
    S.append(s)
print(len(set(S)))

Submission status: Accepted

Solution code:
N = int(input())

l = set()

for i in range(N):
	l.add(input());

print(len(l))

Submission status: Accepted

Solution code:
lotteryCount = int(input())
stringArray = list()
for index in range(0, lotteryCount):
  stringArray.append(input())

variatyCount = len(set(stringArray))
print(variatyCount)

Submission status: Accepted

Solution code:
import collections

n = int(input())
s = [input() for i in range(n)]

ans = collections.Counter(s)
print(len(ans))

Submission status: Accepted

Solution code:
count = int(input())
data= []
for i in range(count):
    data.append(input())

d = set(data)
print(len(d))

Submission status: Accepted

Solution code:
import collections

N = int(input())
S = []
for i in range(N):
    s_pre = str(input())
    S.append(s_pre)

s = collections.Counter(S)

print(len(s))

Submission status: Accepted

Solution code:
N = int(input())
gifts = [input() for param in range(N)]
print(len(set(gifts)))

Submission status: Accepted

Solution code:
Row = int(input())
List = [input() for i in range(Row)]
print(len((set(List))))

Submission status: Accepted

Solution code:
import collections
N = int(input())
S = [input() for _ in range(N)]
print(len(collections.Counter(S)))

Submission status: Accepted

Solution code:
n = int(input())
a = set()
for i in range (1, n+1):
  a.add(input())
print(len(a))

Submission status: Accepted

Solution code:
from collections import deque
N = int(input())
D = deque()
for _ in range(N):
    D.append(input())
print(len(set(D)))

Submission status: Accepted

Solution code:
N = int(input())
S = []
for i in range(N):
    S.append(input())


dic = {}
for i in range(N):
    if (S[i] in dic.keys())==False:
        dic[S[i]] = 1

print(len(dic))

Submission status: Accepted

Solution code:
from collections import defaultdict
N=int(input())

r=[]
for i in range(N):
    r.append(input())
rr=set(r)
print(len(rr))

Submission status: Accepted

Solution code:
n = int(input())
set_ = set()
for i in range(n):
    set_.add(input())
print(len(set_))

Submission status: Accepted

Solution code:
N=int(input())
a=[]
for i in range(N):
  s = input()
  a.append(s)
kind = set(a)
print(len(kind))

Submission status: Accepted

Solution code:
n = int(input())
lis = []

for i in range(n):
    lis.append(input())

print(len(set(lis)))

Submission status: Accepted

Solution code:
n = int(input())
S = []
for _ in range(n):
    S.append(input())
SS = set(S)
print(len(SS))

Submission status: Accepted

Solution code:
a=int(input())
b=[str(input()) for _ in range(a)]
print(len(set(b)))

Submission status: Accepted

Solution code:
import numpy as np
import itertools
 
if __name__ == "__main__":
    N = int(input())
    A = []
    for i in range(N):
        A.append(input())
    ret = len(set(A))
    print(ret)

Submission status: Accepted

Solution code:
n=int(input())
string_list=[input() for i in range(n)]
print(len(set(string_list)))

Submission status: Accepted

Solution code:
N=int(input())
S=[]
for i in range(N):
  S.append(input())
new_S = set(S)
print(len(new_S))

Submission status: Accepted

Solution code:
n=int(input())
a=[]
for ii in range(n):
	s=input()
	a.append(s)

#print(a)
#print(len(a))
print(len(list(set(a))))

Submission status: Accepted

Solution code:
N = int(input())
S = []
for i in range(N):
    S_i = str(input())
    S.append(S_i)

print(len(set(S)))

Submission status: Accepted

Solution code:
n = int(input())
l = []
for i in range(n):
  p = input()
  l.append(p)
l = set(l)
print(len(l))

Submission status: Accepted

Solution code:
lst = []

n = int(input())

for i in range(0, n):
    ele = input()
    lst.append(ele)
mylist = list(dict.fromkeys(lst))
print(len(mylist))

Submission status: Accepted

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

n = int(input())
list1 = [str(input()) for _ in range(n)]

print(len(set(list1)))

Submission status: Accepted

Solution code:
import os

def main():
	n = int(input())
	syo_list = []
	for i in range(n):
		syo = input()
		syo_list.append(syo)
	print(len(set(syo_list)))

if __name__  == "__main__":
	main()

Submission status: Accepted

Solution code:
N = int(input())

S = [input() for i in range(N)]
S_set = set(S)

print(len(S_set))

Submission status: Accepted

Solution code:
n=int(input())
list=[input() for i in range(n)]
print(len(set(list)))

Submission status: Accepted

Solution code:
N = int(input())
S = [input() for _ in range(N)]
uniqued = list(set(S))
print(len(uniqued))

Submission status: Accepted

Solution code:
N = int(input())
L = set({})
for i in range(N):
    L.add(input())
print(len(L))

Submission status: Accepted

Solution code:
N=int(input())
S=[]
count=1
for i in range(N):
 S.append(input())
S.sort()
for i in range(N-1):
 if S[i]!=S[i+1]:
  count += 1
print(count)

Submission status: Accepted

Solution code:
n = int(input())

a = []
for i in range(n):
    s = input()
    a.append(s)
ans = set(a)
print(len(ans))

Submission status: Accepted

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

N = int(input())

S = []
for i in range(N):
  S.append( input() )
  #print(S[i])

print( len(set(S)) )

Submission status: Accepted

Solution code:
n=int(input())
s={}
ct=0
for i in range(n):
  k=input()
  if k not in s: ct+=1
  s[k]=True
print(ct)

Submission status: Accepted

Solution code:
kuziNum=int(input())
nyuuryokuNum=0
prizeDictionary={}

while kuziNum > nyuuryokuNum:
  nextPrize =input()
  if nextPrize not in prizeDictionary :
    prizeDictionary[nextPrize]=nextPrize
  nyuuryokuNum+=1

print(str(len(prizeDictionary.keys())))

Submission status: Accepted

Solution code:
n=int(input())
li=[]
num=0
for i in range(n):
    li.append(input())
se=set(li)
lis=list(se)
print(len(lis))

Submission status: Accepted

Solution code:
N = int(input())
S = []
for n in range(N):
    S.append(input())
S2 = set(S)
print(len(S2))

Submission status: Accepted

Solution code:
t = int(input())
li = []
for _ in range(t):
  i = input()
  li.append(i)
ans = set(li)
print(len(ans))

Submission status: Accepted

Solution code:
import collections

N = int(input())
S = [input() for i in range(N)]
l = list(collections.Counter(S))
print(len(l))

Submission status: Accepted

Solution code:

def main():
    n = int(input())
    string_list = [input() for i in range(n)]
    string_set = set(string_list)
    print(len(string_set))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())
S = [input() for n in range(N)]

print(len(set(S)))

Submission status: Accepted

Solution code:
N = int(input())
S =[]
for i in range(N):
    S.append(str(input()))
SS = set(S)
print(len(SS))

Submission status: Accepted

Solution code:
n = int(input())
s = [str(input()) for i in range(n)]
ans = len(set(s))
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
A=[]
 
for i in range(N):
    S=input()
    A.append(S)
 
print(len(list(set(A))))

Submission status: Accepted

Solution code:
n = int(input());
list_ = [];

for i in range(n):
  list_.append(input());
  
ans = len(list(set(list_)));

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
l = []
for i in range(n):
  l.append(input())
l.sort()
avant = ""
compte =0
for i in range(n):
  if l[i]!=avant:
    compte+=1
    avant=l[i]
print(compte)

Submission status: Accepted

Solution code:
N = int(input())
l = [input() for i in range(N)]
set = list(set(l))
print(len(set))

Submission status: Accepted

Solution code:
input_count = int(input())
goods_list = []

for i in range(input_count):
    input_goods = input()
    goods_list.append(input_goods)

print(len(set(goods_list)))

Submission status: Accepted

Solution code:
str = int(input())

pre_list = []
for i in range(str):
    temp = input().split()
    pre_list.append(temp[0])

ans = list(set(pre_list))
print(len(ans))

Submission status: Accepted

Solution code:
list=[]

N=input()
for i in range(int(N)):
  s=input();
  list.append(s)
kind=len(set(list))
print(kind)

Submission status: Accepted

Solution code:
n=int(input())
s = []
for _ in range(n):
    s.append(input())
sl=set(s)
print(len(sl))

Submission status: Accepted

Solution code:
N = int(input())
arr = [input() for i in range(N)]

print(len(list(set(arr))))

Submission status: Accepted

Solution code:
l = set()
for _ in range(int(input())):
    l.add(input())
print(len(l))

Submission status: Accepted

Solution code:
S  = {}

N = (int)(input())

for i in range(N):
  s = input()
  if s not in S:
    S[s] = 1
    
print(len(S))

Submission status: Accepted

Solution code:
N = int(input())
S = [input() for _ in range(N)]  
S.sort()
uni_count = 1
for i in range(N-1):
    if(S[i+1]!=S[i]):
        uni_count += 1
print(uni_count)

Submission status: Accepted

Solution code:
n = int(input())

x = set()

for i in range(n):
  x.add(input())
  
print(len(x))

Submission status: Accepted

Solution code:
N = int(input())

s = set()
for i in range(N):
    s.add(input())

print(len(s))

Submission status: Accepted

Solution code:
import collections

N=int(input())
A=[input() for i in range(N)]

print(len(set(A)))

Submission status: Accepted

Solution code:
import collections

n = int(input())
s = []
for i in range(n):
    s += [input()]

c = collections.Counter(s)
print(len(c))

Submission status: Accepted

Solution code:
N = input()
S = []
for a in range(int(N)):
    S.append(input())

Answer = set(S)
print(len(list(Answer)))

Submission status: Accepted

Solution code:
"""write your code in method solve"""
def solve():
   
    number=int(input())
    items=[]
    for i in range(number):
        item=input()
        items.append(item)
    a=set(items)
    print(len(a))

    return
solve()

Submission status: Accepted

Solution code:
n = int(input())
s = []
for _ in range(n):
    s.append(input())
print(len(set(s)))

Submission status: Accepted

Solution code:
N = int(input())
A = set([])
count = 0
for _ in range(N):
  item = input()
  if (item in A) == False:
    count = count + 1
    A.add(item)
print(count)

Submission status: Accepted

Solution code:
N = int(input())
L = [str(input()) for i in range(N)]
L_removed = set(L)
print(len(L_removed))

Submission status: Accepted

Solution code:
n = int(input())
List = [[] for i in range(10)]
for i in range(n):
    s = input()
    List[len(s) - 1].append(s)

count = 0
for each_list in List:
    each_list = list(set(each_list))
    count += (len(each_list))



print(count)

Submission status: Accepted

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

import sys
import math


debug = False

def log(text):
    if debug:
        print(text)


def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        lines.append(input())
        n = int(lines[0])
        for _ in range(n):
            lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]
        n = int(lines[0])
    
    s = lines[1:]

    return (n, s)


def solve(n, s):

    result = len(set(s))

    return  result


def main():
    # 出力
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()

Submission status: Accepted

Solution code:
from collections import defaultdict

n = int(input())
s=[0]*n
d={}

for i in range(n):
    s[i]=str(input().split())
    if s[i] in d.keys():
        d[s[i]]+=1
    else:
        d[s[i]]=1

print(len(d))

Submission status: Accepted

Solution code:
n = int(input())
list = {}
for x in range(n):
	item = input()
	list[item] = x
print(len(list))

Submission status: Accepted

Solution code:
lines = []
i =int(input())
for a in range(i):
    line = input()
    lines.append(line)

print(len(set(lines)))

Submission status: Accepted

Solution code:
n = int(input())
s = set()
for i in range(0, n):
    s.add(input())
print(len(s))

Submission status: Accepted

Solution code:
s=set()
for i in range(int(input())):
    a=input()
    s.add(a)
print(len(s))

Submission status: Accepted

Solution code:
N=int(input())
item=[]
for i in range(N):
    item.append(input())
print(len(set(item)))

Submission status: Accepted

Solution code:
n = int(input())
s = [input() for i in range(n)]

ans = len(set(s))

print(ans)

Submission status: Accepted

Solution code:
N = int(input())
S = [0] * N
correct = "null"
check = 0
for i in range(N):
    S[i] = input()
S.sort()
for thing in S:
    if(thing != correct):
        check += 1
    correct = thing
print(check)

Submission status: Accepted

Solution code:
import collections

n = int(input())  # nは入力回数
str_list = []
for i in range(n):
    str_list.append(input())
c = collections.Counter(str_list)
print(len(c))

Submission status: Accepted

Solution code:
N = int(input())
S = [input() for _ in range(N)]

s = set(S)


print(len(s))

Submission status: Accepted

Solution code:
n=int(input())
string_list=[input() for i in range(n)]

m=set(string_list)

print(len(m))

Submission status: Accepted

Solution code:
from collections import Counter

N = int(input())
S = [input() for i in range(N)]

collect_S = Counter(S)
print(len(collect_S))

Submission status: Accepted

Solution code:
N = int(input())
S = []
for i in range(N):
  S.append(input())

l = list(set(S))

print(len(l))

Submission status: Accepted

Solution code:
import collections
N=int(input())
count=0
a=[]
while N>0:
  a.append(input())
  N=N-1
c=collections.Counter(a)
print(len(c))

Submission status: Accepted

Solution code:
N = int(input())
S = [input() for i in range(N)]

S_unique = list(set(S))
print(len(S_unique))

Submission status: Accepted

Solution code:
N =int(input())
keihin ={}
ans = 0
for _ in range(N):
    S = input()   
    keihin[S] = 1


print(sum(keihin.values()))

Submission status: Accepted

Solution code:
import collections
n = int(input())
a = [input() for i in range(n)]
print(len(collections.Counter(a)))

Submission status: Accepted

Solution code:
s=int(input())
a = [input() for i in range(s)]
a=list(set(a))
print(len(a))

Submission status: Accepted

Solution code:
N = int(input())
dic = {}
for i in range(0, N):
  keyName = input()
  if keyName not in dic:
    dic[keyName] = 0
print(len(dic.keys()))

Submission status: Accepted

Solution code:
N = int(input())
L = set()
for _ in range(N):
    s = input()
    if s in L:
        pass
    else:
        L.add(s)

print(len(L))

Submission status: Accepted

Solution code:
n = int(input())
array = [input() for i in range(n)]
print(len(list(set(array))))

Submission status: Accepted

Solution code:
import sys
a = []
for l in sys.stdin:
    a.append(l.rstrip('\n'))
a.pop(0)
b = list(set(a))
print(len(b))