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())
items = []
for i in range(n):
    items.append(input())
s = set(items)
print(len(s))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
s = {}
for i in range(N):
    k = input() 
    if k not in s.keys():
        s[k] = 1
    else:
        s[k] += 1
    
print(len(s))

Submission status: Accepted

Solution code:
import collections

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

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

Submission status: Accepted

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

s = {input() for _ in range(n)}

print(len(s))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
s=['F']*N
for i in range(0,N):
    s[i]=input()
se=set(s)
print(len(se))

Submission status: Accepted

Solution code:
n = int(input())
arr = [str(input()) for _ in range(n)]
arr.sort()
ans = 1
for i in range(1, n):
    if arr[i] != arr[i - 1]:
        ans += 1
print(ans)

Submission status: Accepted

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

dict = {}

for i in range(N):
    s = input()
    if(s not in dict.keys()):
        dict[s] = 1
    else:
        dict[s]=dict[s]+1 

print(len(dict.keys()))

Submission status: Accepted

Solution code:
import collections as col

n = int(input())
s = [input('') for i in range(n)]
prize = col.Counter(s)

print(len(prize))

Submission status: Accepted

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

for i in range(1, n):
    if s[i] != s[i-1]:
        cnt += 1
    
print(cnt)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
S = []
for i in range(N):
    s = input()
    S.append(s)    
print(len(set(S)))

Submission status: Accepted

Solution code:
#C問題
N=int(input())
S = []
for i in range(0,N):
    a = input()
    S.append(a)
print(len(set(S)))

Submission status: Accepted

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

S = sorted(S)
count = 0
first = 0
removecount = 0

for i in range(N):
    j = 0
    while first + count + 1 < len(S) :
        if S[first]==S[first+1+j]:
            S[first+1+j] = "null"
            count+=1
            j += 1
        else:
            first += count + 1
            removecount += count
            count = 0
            break

print(len(S)-S.count("null"))

Submission status: Accepted

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

setS = set(string_list)
print(len(setS))

Submission status: Accepted

Solution code:
N = int(input())
ans_dict = {}
for i in range(N):
  S = input()
  if S not in ans_dict:
    ans_dict[S] = True
    
print(len(ans_dict))

Submission status: Accepted

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

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

Submission status: Accepted

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

dict = {}

for i in l:
    if i in dict:
        dict[i] += 1
    else:
        dict[i] = 1
print(len(dict))

Submission status: Accepted

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

s = 1
for i in range(N-1):
  if List[i+1]==List[i]:
    s = s
  else:
    s = s+1
    
print(s)

Submission status: Accepted

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

Submission status: Accepted

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

import hashlib
base1 = 1007
mod1 = 10**9+7
dic = {}

for s in S:
  hs = hashlib.md5(s.encode()).hexdigest()
  dic.setdefault(hs, s)

print(len(dic))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N=int(input())
S=[0]*N
for i in range(N):
    S[i]=input()
    
a=set(S)
print(len(a))

Submission status: Accepted

Solution code:
import numpy as np
N=int(input())
S_list = np.zeros(N)
#S_list = np.zeros(N,dtype=str)
e_list = "abcdefghijklmnopqrstuvwxyz"

for i in range(N):
  s = input()
  n = 0
  for k in range(len(s)):
    n = n + (e_list.index(s[k])+1)*(100**k)
  S_list[i] = n
print(len(np.unique(S_list)))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import collections
kind = 0
List = []
n = int(input())
List = [input() for _ in range(n)]
d = collections.Counter(List)

for i in d.keys():
    kind += 1
print(kind)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
cnt = int(input())
lst = []
for i in range(cnt):
  lst += [input()]
print(len(set(lst)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range (n):
    s = str(input())
    st.append(s)
  
print(len(set(st)))

Submission status: Accepted

Solution code:
from collections import Counter

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

cnt = Counter(S)


print(len(cnt.keys()))

Submission status: Accepted

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


D=list(set(S))

e=len(D)
print(int(e))

Submission status: Accepted

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

Submission status: Accepted

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

l_unique=list(set(l))
print(len(l_unique))

Submission status: Accepted

Solution code:
import collections
N = int(input())
S = list()
for n in range(N):
  S.append(input())
c = collections.Counter(S)
C = len(c)
print(C)

Submission status: Accepted

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

print(len(list(set(l))))

Submission status: Accepted

Solution code:
n = int(input())
ss = set()
for i in range(n):
    temp = input()
    if temp in ss:
        next
    else:
        ss.add(temp)
        
print(len(ss))

Submission status: Accepted

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

print(len(keihinn_list))

Submission status: Accepted

Solution code:
N=int(input())
a=[0]*(N)
c=0
for i in range (N):
    S=input()
    a[i]=S
c=len(set(a))
print(c)

Submission status: Accepted

Solution code:
input_n = input()
count = int(input_n)

list = []

for value in range(count):
    tmp = input()
    list.append(tmp)

myset = set(list)
print(len(myset))

Submission status: Accepted

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

mylist = list(dict.fromkeys(s))

print(len(mylist))

Submission status: Accepted

Solution code:
N = int(input())
S = []

for num in range(N):
  S.append(input())


S.sort()
result = 1

for num in range(len(S)-1):
  if (S[num] != S[num+1]):
    result += 1

print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
l={}
l1=[]
c=0
for i in range(n):
    l.__setitem__(input(),i)



print(len(l))

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:
def gacha():
    num = int(input())
    pre = {}
    for i in range(0, num):
        a = input()
        if a in pre.keys():
            pre[a]+=1
        else:
            pre[a]=1
    print(len(pre.keys()))
gacha()

Submission status: Accepted

Solution code:
N=int(input())
ans=N
S=[input() for i in range(N)]
S.sort()
for i in range(N-1):
    if S[i]==S[i+1]:
        ans=ans-1
    else:
        pass
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = []

for _ in range(N):
    S.append(input())  

print(len(list(set(S))))

Submission status: Accepted

Solution code:
#S = input()
#S, W2 = input().split()
N = int(input())
#A, B, C, D = map(int, input().split())
#L = list(map(int, input().split()))

#D1 = []
#D2 = [[]] * 4
#D1 = [0] * 5
#D2 = [[0] * 5 for i in range(4)]
#D3 = [[[0] * 5 for i in range(4)] for i in range(3)]

K = {}

for i in range(N):
  S = input()
  if S in K:
    K[S] = K[S] + 1
  else:
    K[S] = 1
#

print(len(K))

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
S = [0] * N
ans = 0
for i in range(N):
    S[i] = input()
print(len(np.unique(S)))

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(s)))

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())
a=[]
for i in range(N):
    a.append(input())
print(len(set(a)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = sorted(list(input() for i in range(N)))
cnt = 0
for i in range(1, N):
    if(S[i-1] != S[i]):
        cnt += 1
print(cnt + 1)

Submission status: Accepted

Solution code:
N = int(input())

S = []
cnt = 0
for n in range(N):
  temp = input()
  S.append(temp)

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

Submission status: Accepted

Solution code:
N = int(input())

WL = []
for i in range(N):
    WL.append(input())

print(len(set(WL)))

Submission status: Accepted

Solution code:
from sys import stdin
import numpy as np
n = int(stdin.readline().rstrip())
data = [stdin.readline().rstrip().split() for _ in range(n)]
print(len(set(np.array(data).reshape(-1,))))

Submission status: Accepted

Solution code:
n = int(input())

str_list = []

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

spe_list = set(str_list)
print(len(spe_list))

Submission status: Accepted

Solution code:
import sys
import math
import bisect

def main():
    A = []
    for _ in range(int(input())):
        A.append(input())
    print(len(set(A)))

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

from collections import Counter
 

mycounter = Counter(s)
print(len(mycounter))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))


x = ni()
s= [[[] for j in range(26)] for i in range(26)]
sum=0
for i in range(x):
    si=ns()
    sn1=ord(si[0:1])-97
    if len(si)==1:
        sn2=0
    else:
        sn2 = ord(si[1:2]) - 97
    if si not in s[sn1][sn2]:
       s[sn1][sn2].append(si)
for s1 in s:
    for s2 in s1:
        sum+=len(s2)
print(sum)

Submission status: Accepted

Solution code:
import collections

N = int(input())
str_list = [input() for _ in range(N)]

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

Submission status: Accepted

Solution code:
import collections

max = int(input())
freebie = [input() for _ in range(max)]

collection = collections.Counter(freebie)
print(len(collection))

Submission status: Accepted

Solution code:
import array

N=int(input())
arr=[input() for _ in range(N)]
dic={}
for i in range(N): #各単語の出現回数を数える
 if arr[i] not in dic:
   dic[arr[i]]=1
 else:
   dic[arr[i]]+=1
count=0
for k in dic.keys():
    count=count+1
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int (input())

s = [input() for i in range(N)]

list = set(s)

length = len(list)

print(length)

Submission status: Accepted

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

for i in range(n):
	s.append(input())
#処理
l=[]
l=list(set(s))
print(len(l))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
S = {input() for i in range(N)}

print(len(S))

Submission status: Accepted

Solution code:
import collections

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

Submission status: Accepted

Solution code:
kaisu = int(input())
keihin = [input() for i in range(kaisu)]
shurui = set(keihin)
print(len(shurui))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
from collections import Counter
a = int(input())

list = [input() for i in range(a)]

print(len(Counter(list)))

Submission status: Accepted

Solution code:
#---gacha
import collections
N = int(input())

S = [0] * N

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

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

Submission status: Accepted

Solution code:
import collections
N = int(input())
l = [input() for _ in range(N)]
import collections
c = collections.Counter(l)

print(len(c))

Submission status: Accepted

Solution code:
import numpy as np
import math
import scipy as sp
import queue
import collections

MOD = 10 ** 9 + 7
INF = 10 ** 9

def main(kwargs):
    S = kwargs["S"]
    res = len(collections.Counter(S))
    return res

if __name__ == "__main__":
    kwargs = {}

    cin = input().split()
    #kwargs["n"] = cin[0]
    #kwargs["n"], kwargs["k"] = cin
    kwargs["n"] = [int(i) for i in cin][0]
    #kwargs["n"], kwargs["k"] = [int(i) for i in cin]

    kwargs["S"] = []
    for i in range(kwargs["n"]):
        cin = input().split()
        s = cin[0]
        #a = cin
        #a = [int(i) for i in cin][0]
        #a = [int(i) for i in cin]
        kwargs["S"].append(s)

    cout = main(kwargs)
    print(cout)

Submission status: Accepted

Solution code:
n = int(input())
s = {input() for i in range(n)}#縦に入力されたものをリストに

print(len(s))

Submission status: Accepted

Solution code:
N=int(input())
k=[]

for _ in range(N):
    s=input()
    k.append(s)

s_l=set(k)

print(len(s_l))

Submission status: Accepted

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

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

print(len(set(s)))

Submission status: Accepted

Solution code:
firstint = int(input())
inputary = [input() for i in range(firstint)] 
dif = set(inputary)

print(len(dif))

Submission status: Accepted

Solution code:
# coding: utf-8
kaisuu = int(input())
getprizelist = {}
for i in range(kaisuu):
    keihin = input()
    if keihin not in getprizelist:
        getprizelist[keihin] = i
print(len(getprizelist))

Submission status: Accepted

Solution code:
n=int(input())
g=[]
for i in range(n):
  gi=input()
  g.append(gi)  
g.sort()
count=1
for i in range(n-1):
  if g[i]!=g[i+1]:
    count+=1

print(count)

Submission status: Accepted

Solution code:

import collections
list = []

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

c = collections.Counter(list)

print(len(c))

#print(list)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# gacha

n = int(input())
ln = set()
for i in (range(n)):
    stn = input()
    if stn in ln:
        pass
    else:
        ln.add(stn)
print(len(ln))

Submission status: Accepted

Solution code:
N = int(input())
List = []
for x in range(N):
    List.append(input())
Set_list = set(List)
print(len(Set_list))

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:
list1 =[]
number = int(input())
for i in range(0,number):    
    numbers = input()
    list1.append(numbers)
setOfMarks=set(list1)
print(len(setOfMarks))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, lists = int(input()), []
for x in range(a):
    lists.append(input())
print(len(list(set(lists))))

Submission status: Accepted

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

print(len(set(lst)))

Submission status: Accepted

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

Submission status: Accepted

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


print(ci)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(nums):
    lst[i] = input()
lst2 = set(lst)

print(len(lst2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

N = int(input())
S = []
cnt = 0


for i in range(N):
    S.append(input()) #Nこの文字列を読み込み　行列

S.sort()
for i in range(0,N-1):
    if (S[i] == S[i+1]):
        cnt += 1

ans = N - cnt



print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
#listA=list(map(str,input().split()))
#listB=list(set(listA))
#print(len(listB))
l=list()
while N>0:
    l.append(input())
    N=N-1
l2=list(set(l))
print(len(l2))

Submission status: Accepted

Solution code:
n=int(input())
slist=[]
var=0
for a in range(n):
  s=input()
  slist.append(s)
sset=set(slist)
print(len(sset))

Submission status: Accepted

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

print(len(set(prize)))

Submission status: Accepted

Solution code:
n = int(input())
l = [input() for _ in range(n)]
o = l[0:n+1]

print(len(list(set(o))))

Submission status: Accepted

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

for i in range(N):
  a.append(input())
  
b = set(a)
print(len(b))

Submission status: Accepted

Solution code:
n=int(input())
d={}
while(n):
    n=n-1
    s=input()
    d[s]=1
count=0
for key,value in d.items():
    if(value>=1):
        count=count+1
print(count)

Submission status: Accepted

Solution code:
num=int(input())
list0=[]
for i in range(num):
  date=input()
  list0.append(date)
list0=set(list0)
print(len(list0))

Submission status: Accepted

Solution code:
time = int(input())

wordCount = {}
ans  = 0
for i in range(time):
    word = input()
    if word not in wordCount:
        wordCount[word] = 1
        ans += 1;
    else:
        wordCount[word] += 1

print(ans)

Submission status: Accepted

Solution code:
import collections

Row = int(input())
List = [input() for i in range(Row)]
 
c=collections.Counter(List)

  
print(len(list(c.keys())))

Submission status: Accepted

Solution code:
N = int(input())
item = set()
for i in range(N):
    item.add(input().strip())

print(item.__len__())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import sys
 
 
def main():
  n=int(input())
  string_list=[input() for i in range(n)]
  string_list_unique = list(set(string_list))
  print(len(string_list_unique))
 
 
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import collections

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

c = collections.Counter(S)

print(len(c))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

dict={}
for i in range(n):
    dict.setdefault(input())
print(len(dict)) 




### C++と同じく、実行は、Opt + Ctl + N

'''
# -*- coding: utf-8 -*-
# get a integer
a = int(input())
# get two integers separated with half-width break
b, c = map(int, input().split())
# get a string
s = input()
# output
print('{} {}'.format(a+b+c, s))
'''

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import Counter
x = input()
x = int(x)
li = list()
for i in range(x):
    li.append(input())
print(len(Counter(li).keys()))

Submission status: Accepted

Solution code:
import collections

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

c = collections.Counter(S)

print(len(c))

Submission status: Accepted

Solution code:
a = list(map(int, input().split()))
b = [input() for i in range(a[0])]
c = set(b)
print(len(c))

Submission status: Accepted

Solution code:
import math
#数値ひとつ
I = int(input())
#数値欲しいとき
#N, M = map(int, input().split())
#文字欲しいとき
#N = input()
#それをListにしたいとき
#listA = list(N)
#受け取る数が未定かつリストにしたいとき
#list = list(map(int, input().split()))
#受け取る文字列が未定かつリストにしたいとき(Iは回数)
list = [input() for i in range(I)]
print(len(set(list)))

Submission status: Accepted

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

c = collections.Counter(S)

print(len(c.keys()))

Submission status: Accepted

Solution code:

def c():
    n = int(input())
    s = ['']*n
    for i in range(n):
        s[i] = input()
    s.sort()
    count = 1
    for i in range(1, n):
        if s[i - 1] != s[i]:
            count += 1
    print(count)

def b():
    a,b,c,d = map(int, input().split())
    while True:
        c -= b
        if c <= 0:
            print('Yes')
            break
        a -= d
        if a <= 0:
            print('No')
            break

def a():
    s, w = map(int, input().split())
    if w >= s:
        print('unsafe')
    else:
        print('safe')



c()

Submission status: Accepted

Solution code:
N = int(input())
lst = []
a = 1
while True :
    A = str(input())
    lst.append(A)
    if a >= N :
        break
    else :
        pass
    a += 1
newlist = list(dict.fromkeys(lst))
print(len(newlist))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import os

N = input()
S = set() 
N = int(N)
count = 0
for i in range(int(N)):
    tmp = input()
    if (tmp in S) == False:
        count += 1
    S.add(tmp)


print (count)

Submission status: Accepted

Solution code:
import collections

N = int(input())
h = list(input() for x in range(N))
c = collections.Counter(h)
print(len(c))

Submission status: Accepted

Solution code:
n = int(input())  # nは入力回数
str_list = [input() for _ in range(n)]
str_list.sort()
before = None
count = 0
for s in str_list:
  if before != s:
    count = count + 1
  before = s
print(count)

Submission status: Accepted

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

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:
N = int(input())
list=[]
for i in range(N):
    list.append(input())
result = set(list)

print(len(result))

Submission status: Accepted

Solution code:
N=int(input())
names=[0]*(N+3)
for i in range(N):
    names[i]=input()
count=list(set(names))
count=len(count[1:])
print(count)

Submission status: Accepted

Solution code:
K = int(input())
L = []
for i in range(1,K+1):
    t =input()
    L.append(t)
S = set(L)
print(len(S))

Submission status: Accepted

Solution code:
n = int(input())
dicString = {}
for i in range(n):
    elem = input()
    dicString[f'{elem}']  = 1
count = 0
for elem in dicString.values():
    count += elem
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter
N      = int(input())
prise  = [input() for i in range(N)]

counter = Counter(prise)
print(len(counter))

Submission status: Accepted

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

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

ss = sorted(s)
c = len(s)

for i in range(1,n):
	if ss[i-1] == ss[i]:
		c -= 1

print(c)

Submission status: Accepted

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

print(len(set(s_list)))

Submission status: Accepted

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

Submission status: Accepted

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

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())
a=['' for i in range(200005)];
for i in range(n):
    a[i]=input()
a=set(a)
print(len(a)-1)

Submission status: Accepted

Solution code:
from collections import Counter

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

setA = set(A)

print(len(setA))

Submission status: Accepted

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

print(len(set(L)))

Submission status: Accepted

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

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())
lst = []
for _ in range(N):
    lst.append(input())
print(len(set(lst)))

Submission status: Accepted

Solution code:
a,*b=map(str, open(0).read().split())
s=set(b)
print(min(int(a),len(s)))

Submission status: Accepted

Solution code:
import numpy as np 
n = int(input())
s = np.empty(n,dtype =object)
for i in range(n):
    s[i] = input()
print(np.unique(s).size)

Submission status: Accepted

Solution code:

n, = [int(val) for val in input().split()]
gifts = set()
for i in range(n):
    s = input()
    gifts.add(s)
# print(gifts)
print(len(gifts))

Submission status: Accepted

Solution code:
n=int(input())
s=[]
for i in range(n):
    s.append(input())
#print(s)
b=sorted(s)
#print(b)
a=1
for i in range(n-1):
    if b[i]!=b[i+1]:
        a=a+1
print(a)

Submission status: Accepted

Solution code:
n = int(input())
s = dict({})
for i in range(n):
    x = input()
    s[x] = 1
print(len(s.keys()))

Submission status: Accepted

Solution code:
n = int(input())
dic = {}
for i in range(n):
    n = input()
    dic[n] = dic.get(n, 0) + 1
print(len(dic.keys()))

Submission status: Accepted

Solution code:
n = int(input())

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

l = list(set(s))

print(len(l))

Submission status: Accepted

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

S_set = list(set(S))



print(len(S_set))

Submission status: Accepted

Solution code:
#200426C
import collections
N = int(input())

X = []
ans = 0
for i in range(N):
    S = str(input())
    X.append(S)
Y = collections.Counter(X)
print(len(Y))

Submission status: Accepted

Solution code:
N = int(input())

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

s = set(S)
count = 0
for i in range(len(s)):
    count = count + 1
print(count)