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:


itemsList={}
num=int(input())
for i in range(num):
    temp=input()
    if not temp in itemsList:
        itemsList[temp]=1
print(len(itemsList))

Submission status: Accepted

Solution code:
N=int(input())
A=[0]*N
for i in range(N):
    A[i]=input()

B=set(A)

print(len(B))

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:
N = int(input())
S = []
for _ in range(N):
    S.append(input())

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

Submission status: Accepted

Solution code:
N = int(input())
keihin =[]
cnt = 0
for i in range(N):
    keihin.append(str(input()))

print(len(set(keihin)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# import math
# import numpy as np
# import itertools
# import heapq
# =map(int,input().split())
n=int(input())
ans=0
q=[]
for i in range(n):
    x=input()
    # if x not in q:
        # ans+=1
    q.append(x)
w=set(q)
ans=len(w)
print(ans)

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:
num=int(input())
str=[]
for i in list(range(num)):
    str.append(input())
set_strs=set(str)
print(len(set_strs))

Submission status: Accepted

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

print(len(set(l)))

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(str_list)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

n = int(input())

Li = [input() for _ in range(n)]
Li.sort()
s= Li[0]
c =1
for l in Li[1:]:
    if l == s:
        pass
    else:
        c+=1
        s = l
print(c)

Submission status: Accepted

Solution code:
import sys
input()
print(len(set(sys.stdin.readlines())))

Submission status: Accepted

Solution code:
import sys
from math import factorial
from collections import Counter
from fractions import Fraction
import heapq, bisect, fractions
import math
import itertools
sys.setrecursionlimit(10 ** 5 + 10)
INF = 10**15 +5
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
MOD = 10**9 + 7

n = INT()
res = []
for i in range(n):
    s = input()
    res.append(s)
res = list(set(res))

print(len(res))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
n=int(input())
string_list=[input() for i in range(n)]

a = set(string_list)
print(len(a))

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
N,= map(int, input().split())
S=[]
su=0
for i in range(N):
    a = input()
    S+=[a]    
print(len(set(S)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys,bisect,string,math,time,functools,random
from heapq import heappush,heappop,heapify
from collections import deque,defaultdict,Counter
from itertools import permutations,combinations,groupby
def Golf():*a,=map(int,open(0))
def I():return int(input())
def S_():return input()
def IS():return input().split()
def LS():return [i for i in input().split()]
def LI():return [int(i) for i in input().split()]
def LI_():return [int(i)-1 for i in input().split()]
def NI(n):return [int(input()) for i in range(n)]
def NI_(n):return [int(input())-1 for i in range(n)]
def StoLI():return [ord(i)-97 for i in input()]
def ItoS(n):return chr(n+97)
def LtoS(ls):return ''.join([chr(i+97) for i in ls])
def GI(V,E,ls=None,Directed=False,index=1):
    org_inp=[];g=[[] for i in range(V)]
    FromStdin=True if ls==None else False
    for i in range(E):
        if FromStdin:
            inp=LI()
            a,b,c=(inp+[1])[:3]
            org_inp.append(inp)
        else:
            index=0
            a,b,c=(list(ls[i])+[1])[:3]
        if index==1:a-=1;b-=1
        aa=(a,c);bb=(b,c);g[a].append(bb)
        if not Directed:g[b].append(aa)
    return g,org_inp
def GGI(h,w,search=None,replacement_of_found='.',mp_def={'#':1,'.':0}):
#h,w,g,sg=GGI(h,w,search=['S','G'],replacement_of_found='.',mp_def={'#':1,'.':0}) # sample usage
    mp=[1]*(w+2);found={}
    for i in range(h):
        s=input()
        for char in search:
            if char in s:
                found[char]=((i+1)*(w+2)+s.index(char)+1)
                mp_def[char]=mp_def[replacement_of_found]
        mp+=[1]+[mp_def[j] for j in s]+[1]
    mp+=[1]*(w+2)
    return h+2,w+2,mp,found
def TI(n):return GI(n,n-1)
def bit_combination(k,n=2):
    rt=[]
    for tb in range(n**k):
        s=[tb//(n**bt)%n for bt in range(k)];rt+=[s]
    return rt
def show(*inp,end='\n'):
    if show_flg:print(*inp,end=end)

YN=['YES','NO'];Yn=['Yes','No']
mo=10**9+7
inf=float('inf')
l_alp=string.ascii_lowercase
#sys.setrecursionlimit(10**7)
input=lambda: sys.stdin.readline().rstrip()

class Comb:
    def __init__(self,n,mo=10**9+7):
        self.fac=[0]*(n+1)
        self.inv=[1]*(n+1)
        self.fac[0]=1
        self.fact(n)
        for i in range(1,n+1):
            self.fac[i]=i*self.fac[i-1]%mo
            self.inv[n]*=i
            self.inv[n]%=mo
        self.inv[n]=pow(self.inv[n],mo-2,mo)
        for i in range(1,n):
            self.inv[n-i]=self.inv[n-i+1]*(n-i+1)%mo
        return
    
    def fact(self,n):
        return self.fac[n]
        
    def invf(self,n):
        return self.inv[n]

    def comb(self,x,y):
        if y<0 or y>x:
            return 0
        return self.fac[x]*self.inv[x-y]*self.inv[y]%mo

show_flg=False
show_flg=True


## Segment Tree ##

## Initializer Template ##
# Range Sum:        sg=SegTree(n)
# Range Minimum:    sg=SegTree(n,inf,min,inf)

class SegTree:

    def __init__(self,n,init_ls=None,init_val=0,function=lambda a,b:a+b,ide=0):
        self.n=n
        self.ide_ele=ide_ele=ide
        self.num=num=2**(n-1).bit_length()
        self.seg=seg=[self.ide_ele]*2*self.num
        self.lazy=lazy=[self.ide_ele]*2*self.num
        self.segfun=segfun=function
        #set_val
        if init_ls==None:
            for i in range(n):
                self.seg[i+self.num-1]=init_val
        else:
            for i in range(n):
                self.seg[i+self.num-1]=init_ls[i]
        #build
        for i in range(self.num-2,-1,-1):
            self.seg[i]=self.segfun(self.seg[2*i+1],self.seg[2*i+2])
    
    def update(self,k,x):
        k += self.num-1
        self.seg[k] = x
        while k:
            k = (k-1)//2
            self.seg[k] = self.segfun(self.seg[k*2+1],self.seg[k*2+2])
        
    def evaluate(k,l,r): #遅延評価処理
        if lazy[k]!=0:
            node[k]+=lazy[k]
            if(r-l>1):
                lazy[2*k+1]+=lazy[k]//2
                lazy[2*k+2]+=lazy[k]//2

        lazy[k]=0
        
    def query(self,p,q):
        if q<=p:
            return self.ide_ele
        p += self.num-1
        q += self.num-2
        res=self.ide_ele
        while q-p>1:
            if p&1 == 0:
                res = self.segfun(res,self.seg[p])
            if q&1 == 1:
                res = self.segfun(res,self.seg[q])
                q -= 1
            p = p//2
            q = (q-1)//2
        if p == q:
            res = self.segfun(res,self.seg[p])
        else:
            res = self.segfun(self.segfun(res,self.seg[p]),self.seg[q])
        return res
    
    def find_min_index(self,p,q,m):
        if q<=p:
            return self.ide_ele
        p += self.num-1
        q += self.num-2
        res=self.ide_ele
        while q-p>1:
            if p&1 == 0:
                res = self.segfun(res,self.seg[p])
            if q&1 == 1:
                res = self.segfun(res,self.seg[q])
                q -= 1
            p >>= 1
            q = (q-1)//2
        if p == q:
            res = self.segfun(res,self.seg[p])
        else:
            res = self.segfun(self.segfun(res,self.seg[p]),self.seg[q])
        return res


    def __str__(self):
        # 生配列を表示
        rt=self.seg[self.num-1:self.num-1+self.n]
        return str(rt)

class Tree:
    def __init__(self,inp_size=None,init=True):
        if init:
            self.stdin(inp_size)
        return

    def stdin(self,inp_size=None):
        if inp_size==None:
            self.size=int(input())
        else:
            self.size=inp_size
        self.edges,_=GI(self.size,self.size-1)
        return
    
    def listin(self,ls):
        self.size=len(ls)+1
        self.edges,_=GI(self.size,self.size-1,ls)
        return

    def __str__(self):
        return  str(self.edges)

    def dfs(self,x,func=lambda prv,nx,dist:prv+dist,root_v=0):
        q=deque()
        q.append(x)
        v=[-1]*self.size
        v[x]=root_v
        while q:
            c=q.pop()
            for nb,d in self.edges[c]:
                if v[nb]==-1:
                    q.append(nb)
                    v[nb]=func(v[c],nb,d)
        return v

    def EulerTour(self,x,func=lambda prv,nx,dist:prv+dist,root_v=0):
        q=deque()
        q.append((-1,x))
        v=[None]*self.size
        v[x]=root_v
        et=[]
        while q:
            cb,ce=q.pop()
            et.append(ce)
            for nb,d in self.edges[ce]:
                if v[nb]==None:
                    q.append((nb,ce))
                    q.append((ce,nb))
                    v[nb]=func(v[ce],nb,d)
        vid=[[-1,-1]for i in range(self.size)]
        for i,j in enumerate(et):
            if vid[j][0]==-1:
                vid[j][0]=i
            else:
                vid[j][1]=i
        return v,et,vid
    
    def LCA_init(self,depth,et):
        self.st=SegTree(self.size*2-1,func=min,ide=inf)
        for i,j in enumerate(et):
            self.st.update(i,j)
        self.LCA_init_stat==True
        return
    
    def LCA(self,root,x,y):
        if self.LCA_init_stat==False:
            depth,et,vid=self.EulerTour(root)
            self.LCA_init(depth,et)
        return self.st.query(x,y+1)

def dijkstra(edge,st):
    # edge=[[(v_to,dist_to_v),...],[],...]
    # initialize: def: d=dist(st,i), prev=[previous vertex in minimum path], q[]
    n=len(edge)
    d=[(0 if st==i else inf) for i in range(n)]
    prev=[0]*n
    q=[(j,i) for i,j in enumerate(d)]
    heapify(q)
    
    # calc
    while q:
        dist,cur=heappop(q)
        for dst,dist in edge[cur]:
            alt=d[cur]+dist
            if alt<d[dst]:
                d[dst]=alt
                prev[dst]=cur
                heappush(q,(alt,dst))
    return d,prev


ans=0
n=I()
d=defaultdict(int)

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

print(len(d))

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 sys 
try:
	sys.stdin = open('input.txt', 'r') 
	sys.stdout = open('output.txt', 'w')
except:
	pass
# input = sys.stdin.readline
for tt in range(1):
	n = int(input())
	s = set()
	for i in range(n):
		s.add(input())
	print(len(s))

Submission status: Accepted

Solution code:
n = int(input())
l = []
while(n):
  s = input()
  l.append(s)
  n = n-1
ans = set(l)
print(len(ans))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    import sys
    N=int(sys.stdin.readline())
    st=set()
    for i in range(N):
        st.add(input().strip())
    print(len(st))
main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main(N, S):
    print(len(set(S)))


if __name__ == '__main__':
    S = []
    N = int(input())
    for i in range(N):
        S.append(input())
    main(N, S)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    S_set = set()

    for i in range(N):
        S_set.add(input())

    print(len(S_set))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:

N = int(input())

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

LL = sorted(L)

ans = 1
for i in range(N-1):
    if LL[i+1] != LL[i]: ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = {1}

for _ in range(N):
    a = input()
    S.add(a)

print(len(S)-1)

Submission status: Accepted

Solution code:
n = int(input())
st = set()
for i in range(n):
    a = input()
    if not a in st:
        st.add(a)

print(len(st))

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())
S = []
for _ in range(N):
    s = str(input())
    S.append(s)
S1 = sorted(S)
counter=1
for i in range(N-1):
    if S1[i]!=S1[i+1]:
        counter+=1
print(counter)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

N=int(input())
lis=[]
for i in range(N):
    s=input()
    lis.append(s)
c = collections.Counter(lis)
print(len(c))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(n):
    m[i] += 1
    s.append(input())
    
d = dict(zip(s, m))
result = 0
for value in d.values():
    result += value
print(result)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a = int(input())
S = [input() for i in range(a)]
res = 1

S.sort()

for i in range(a - 1):
    if S[i] != S[i + 1]:
        res = res + 1

print(res)

Submission status: Accepted

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

sp=set(s)

print(len(sp))

Submission status: Accepted

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

print(len(l))

Submission status: Accepted

Solution code:
N = int(input())

t = set()

for _ in range(N):
    t.add(input())

print(len(t))

Submission status: Accepted

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

se = set(s)

print(len(se))

Submission status: Accepted

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

from collections import Counter

print(len(Counter(S)))

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:
import sys
stdin = sys.stdin
     
pi=3.1415
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()))

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

S.sort()
c=0
tmp=''
for i in range(N):
    val=S.pop()
    if(val!=tmp):
        c+=1
    tmp=val

print(c)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

l = list(set(l))
print(l.__len__())

Submission status: Accepted

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

for i in range(N):
    present.append(input())

ans_list = set(present)
print(len(ans_list))

Submission status: Accepted

Solution code:
n = int(input())
c = 1
s = []
for i in range(n):
  ss = input()
  s.append(ss)
s.sort()  
for j in range(1,n):
  #print(s[i],s[i-1])
  if s[j] !=s[j-1]:
    c+=1 
print(c)

Submission status: Accepted

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

print(len(c))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 19 21:27:49 2020

@author: arute
"""


from sys import stdin

import time
import numpy as np


############################################

# read data for n sequences.
temp = stdin.readline().split()
N = int(temp[0])

data = []
write = stdin.readline().split()
data = set()
for i in range(N):
    #print(write)
    data.add(write[0])
    write = stdin.readline().split()
    
print(len(data))

Submission status: Accepted

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

Submission status: Accepted

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

if N ==1:
    print(1)
else:
    count=1
    S_n.sort()
    prize= S_n.pop()
    for i in range(N-1):
        neprize = S_n.pop()
        if prize != neprize:
            count +=1
            prize = neprize
    print(count)

Submission status: Accepted

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

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

print(len(sets))

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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:
N = int(input())
L = [input() for _ in range(N)]
S = set(L)
print(len(S))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
s=[str(input()) for i in range (n)]
l=sorted(s)
t=1
for i in range (n-1):
    if l[i+1]!=l[i]:
        t+=1
print(t)

Submission status: Accepted

Solution code:
N = int(input())

lis = []

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

s = set(lis)
print(len(s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
i=0
S=[]
for i in range(0,N):
    S.append(input())
if 1<=N<=2*10**5:
    S=list(set(S))
    print(len(S))

Submission status: Accepted

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

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

c = collections.Counter(s)

print(len(c))

Submission status: Accepted

Solution code:
iterate = int(input())
unique_item = set()
for i in range(iterate):
  unique_item.add(input())

print(len(unique_item))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
ary = {}
for _ in range(n):
    s = input()
    if s in ary:
        ary[s] = ary[s] + 1
    else:
        ary[s] = 1
# print(ary)
print(len(ary.keys()))

Submission status: Accepted

Solution code:
from collections import defaultdict
N = int(input())
dictionary = defaultdict(bool)
ans = 0
for _ in range(N):
  S = input()
  if (S not in dictionary.keys()):
    ans += 1
    dictionary[S] = True
print(ans)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
N = int(input())
items = {}
ans = 0
for _ in range(N):
    items[input()] = None
print(len(items))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter

N = int(input())

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

print(len(counter.keys()))

Submission status: Accepted

Solution code:
keihin = {}
n = int(input())
for i in range(n):
    k = input()
    keihin[k] = 1

print(len(keihin))

Submission status: Accepted

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

Submission status: Accepted

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

lst=list(set(lst))
print(len(lst))

Submission status: Accepted

Solution code:
N = int(input())
SSet = set()
noCount = 0
for i in range(N):
    itemInput = input()
    if itemInput in SSet:
        continue
    else:
        SSet.add(itemInput)
        noCount += 1
print(noCount)

Submission status: Accepted

Solution code:
N = int(input())
ans = set()

for _ in range(N):
    ans.add(input())

print(len(ans))

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def LS(): return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


def LIR(n):
    return [LI() for i in range(n)]


def SR(n):
    return [S() for i in range(n)]


def LSR(n):
    return [LS() for i in range(n)]


sys.setrecursionlimit(1000000)
mod = 1000000007


def solve():
    n = I()
    s = [input() for i in range(n)]
    cs = Counter(s)
    print(len(cs))

    return


# Solve
if __name__ == "__main__":
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
slist=list(input() for i in range(N))





print(len(list(set(slist))))

Submission status: Accepted

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


print(len(list(set(slist))))

Submission status: Accepted

Solution code:

N = int(input())

res = set()
for i in range(N):
    res.add(input())
print(len(res))

Submission status: Accepted

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

S_ = [s[0] for s in S]

set_S = set(S_)

print(len(set_S))

Submission status: Accepted

Solution code:
#coding:utf-8

n = int(input())
l = []
count = 0

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

l = set(l)
count = len(l)
print("{}".format(count))

Submission status: Accepted

Solution code:
import bisect

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

for i in range(n):
    if bisect.bisect_left(a, s[i]) == bisect.bisect_right(a, s[i]):
        a.append(s[i])
print(len(a))

Submission status: Accepted

Solution code:
import collections
N=int(input())
s =list(map(str,[input() for m in range(N)]))       
c=collections.Counter(s)
print(len(c))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
N = input()
Si = [input() for _ in range(int(N))]

uni = np.unique(Si)

print(len(uni))

Submission status: Accepted

Solution code:
N = int(input())
str_list = set()

for i in range(N):
    n = input()
    if n in str_list:
        continue
    else:
        str_list.add(n)
print(len(str_list))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter
n = int(input())
s_list = []
for i in range(n):
    s_list.append(input())
s_counter = Counter(s_list)
most_s = s_counter.most_common()
print(len(most_s))
#print(len(most_s))

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
n=int(input())
l={}

for i in range(n):
  l[input()]=1

print(len(l))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

item = set()
for _ in range(int(input())):
    item.add(input())

print(len(item))

Submission status: Accepted

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

for i in range(n):
  s = input()
  k.add(s)

print(len(k))

Submission status: Accepted

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

print(len(set(li)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = {}
for _ in range(n):
    s[input()] = 1

print(len(s))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

ans = {}
for _ in range(N):
    S = input()
    ans[S] = 1

print(len(ans))

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    n = int(input())
    elements = set()

    for _ in range(n):
        w = input()
        elements.add(w)

    print(len(elements))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#S = input()
N = int(input())
#A, B, C = input().split()
#N, M = map(int, input().split())

#N = int(input())
#A = [int(x) for x in input().split()]

#H, W = map(int, input().split())
S = [input() for _ in range(N)]
print(len(set(S)))

Submission status: Accepted

Solution code:
inputLine = input()

numInput = int(inputLine)
outputSet = set()

for index in range(numInput) :

	inputLine = input()

	if inputLine not in outputSet :
		outputSet.add(inputLine)

print(len(outputSet))

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())
s = [input() for _ in range(n)]
print(len(set(s)))

Submission status: Accepted

Solution code:
keihin = int(input())

keihin_list = []
for i in range(keihin):
    keihin_list.append(input())

print(len(set(keihin_list)))

Submission status: Accepted

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

S_list = []
for i in range(N):
  #文字列の入力
  S = input()
  S_list.append(S)
  
S_list = set(S_list)
S_list = list(S_list)


print(len(S_list))