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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n= int(input())
items={}
for i in range(n):
    s=input()
    items[s]=0
print(len(items))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
#      .      '                    Udit Gupta @luctivud         ,              
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                            ##     ##  #######  # #  ######
                            ##     ##  ##   ##  ###    ##
                            ##     ##  ##    #  # #    ##
                            #########  #######  # #    ##
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

import sys
import math as mt
# sys.setrecursionlimit(10**6)

def get_ints(): return map(int, sys.stdin.readline().strip().split())
def get_array(): return list(map(int, sys.stdin.readline().strip().split()))

def printwsp(*args): return print(*args, end="")
def printsp(*args): return print(*args, end=" ")
def printchk(*args): return print(*args, end="tst, ")

MOD = int(1e9+7); BABYMOD = 998244353;
# ################################ HELPER PROGRAMS USED ###################################
# ################################## MAIN STARTS HERE #####################################
d = dict()
for _testcases_ in range(int(input())):
    s = input()
    d[s] = 1
ans  = 0
for k, v in d.items():
    ans += 1
print(ans)


# #########################################################################################
'''
THE LOGIC AND APPROACH WAS DEVELOPED BY ME @luctivud.
SOME PARTS OF THE CODE HAS BEEN TAKEN FROM WEBSITES LIKE::
(I Own the code if no link is provided here or I may have missed mentioning it)
PLEASE DO NOT PLAGIARISE.
'''

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())

S = []

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

s = set(S)


print(len(s))

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())

count = []

for _ in range(N):
    temp = input()
    count.append(temp)
    
count = set(count)

print(len(count))

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n = int(input())
a = []
for i in range(n) :
  x = input()
  a.append(x)
a.sort()
p = a[0]
ans = 1
for i in range(1,n) :
  if p != a[i] :
    ans += 1
    p = a[i]
print(ans)

Submission status: Accepted

Solution code:

def howManyPresent(N):
    seen = []
    for i in range(N):
        p = str(input())
        seen.append(p)
    return len(set(seen))


N = int(input())

print(howManyPresent(N))

Submission status: Accepted

Solution code:
# coding=UTF-8
from collections import deque
from operator import itemgetter
from bisect import bisect_left, bisect
import itertools
import sys
import math
import numpy as np
sys.setrecursionlimit(10**6)
input = sys.stdin.readline


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(l)))

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:
N = int(input())

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

Submission status: Accepted

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

print(len(l))

Submission status: Accepted

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

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:
import collections

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

Submission status: Accepted

Solution code:
# 初期入力
import sys
input = sys.stdin.readline

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

from collections import Counter
c = Counter(S)
print(len(c))

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:

def Sol(arr):
    
    print(len(set(arr)))
    return

    

#for t in range(int(input())):
#n,k,d,c = map(int,input().split())
n = int(input())
arr = []
for i in range(n):
    arr.append(input())
#arr = list(map(int,input().split()))
#k = input()
#n = int(input())
Sol(arr)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

n=int(input())

c=0
s=list()

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


c = collections.Counter(s)

print(len(c))

Submission status: Accepted

Solution code:
n = int(input())
ans = {}
cnt = n
for i in range(n):
    s = input()
    if s in ans:
        cnt -= 1
    else:
        ans[s] = '1'
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

print(len(A))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

set_a = set(a)

print(len(set_a))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import random

n = int(input())
m = []
for i in range(n):
    m.append(input())  

# ll = []
# for j in range(n):
#     ll.append(m[random.randrange(n)])
print(len(set(m)))

Submission status: Accepted

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

for i in range(N):
    S = input()
    set_list.add(S)

print(len(set_list))

Submission status: Accepted

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

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

S.sort()
ans = 1

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

print(ans)

Submission status: Accepted

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

print(len(ss))

Submission status: Accepted

Solution code:
N = int(input())

pre = list(range(N))

for i in range (N):

    pre[i] = input()


ans = set(pre)

print(len(ans))

Submission status: Accepted

Solution code:
N = int(input())

arr = []

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

print(len(set(arr)))

Submission status: Accepted

Solution code:

def main():
    N = int(input())
    keihin_l = []
    
    for _ in range(N):
        s = input()
        keihin_l.append(s)

    delete_duplicate_list = set(keihin_l)
    out = len(list(delete_duplicate_list))
    print(out)
main()

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 = dict()

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

print(len(d))

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

Submission status: Accepted

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

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())
lottery = []
while len(lottery) < N:
    lottery.append(input())
print(len(set(lottery)))

Submission status: Accepted

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

print(len(set(p_list)))

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())
list=[input() for i in range(n)]
c = collections.Counter(list)
print(len(c))

Submission status: Accepted

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

print(len(s_uni))

Submission status: Accepted

Solution code:
tmp = input().split()
N = int(tmp[0])

ListG = []

for i in range(N):
    ListG.append(input().split())

ListG.sort()
p = 1
for i in range(N-1):
    if ListG[i] == ListG[i+1]:
        continue
    else:
        p = p +1

print(p)

Submission status: Accepted

Solution code:
import sys
import math
from collections import deque
input = lambda: sys.stdin.readline().rstrip()
Yes = lambda boolean: print('Yes') if boolean else print('No')
YES = lambda boolean: print('YES') if boolean else print('NO')
aint = lambda: int(input())
ints = lambda: list(map(int, input().split()))
is_even = lambda x: True if x%2==0 else False

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

Submission status: Accepted

Solution code:
def resolve():
    import sys
    input = lambda: sys.stdin.readline().rstrip()
    r = [0] * int(input())
    print(len({input() for _ in r}))

if __name__ == "__main__":
	resolve()

Submission status: Accepted

Solution code:
N = int(input())

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

print(len(set(list)))

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

print(len(set(string_list)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter
n=int(input())
s=[input() for i in range(n)]
k=0
kinds=Counter(s)
for i in kinds.values():
    k+=1
print(k)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter

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

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


if __name__ == "__main__":
  resolve()

Submission status: Accepted

Solution code:
num = int(input())
product_list = []

for _ in range(num):
  product_list.append(input())

print(len(set(product_list)))

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 i in range(N):
    S.append(input())

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

Submission status: Accepted

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

N = int(input())
p_list = []

while N > 0:
    S = input()
    p_list.append(S)
    N -= 1

p_set = (set(p_list))
print(len(p_set))

Submission status: Accepted

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

sets = set(list)
print(len(sets))

Submission status: Accepted

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

def histogram_sorted(data):
    table = []
    prev = data[0]
    c = 1 
    for i in range(1,len(data)):
        if prev == data[i]:
            c=c+1
        else:
            table.append([prev,c])
            prev = data[i]
            c = 1
    table.append([prev,c]) 
    return table

T = []
for i in range(N):
    T.append(S[i])
    
    
print(len(histogram_sorted(sorted(T))))

Submission status: Accepted

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

print(len(set(a)))

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

num = int(input())
keihin = [input() for i in range(num)]
shurui = collections.Counter(keihin)

print(len(shurui.values()))

Submission status: Accepted

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

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

Submission status: Accepted

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

print(len(check_dict.keys()))

Submission status: Accepted

Solution code:
N=int(input())


dic={}

for i in range(N):
  x=input()
  if x in dic:
    dic[x]+=1
  else:
    dic[x]=1
    
print(len(dic))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
import sys

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

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

Submission status: Accepted

Solution code:
nums = int(input())
keihin = []

for i in range(0,nums):
  word = input()
  keihin.append(word)

print(len(list(set(keihin))))

Submission status: Accepted

Solution code:
issues = set()

N = int(input())

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

print(len(issues))

Submission status: Accepted

Solution code:
N = int(input())
L = []
for n in range(N):
    L.append(str(input()))
L = sorted(L)
#print(L)
ans = 1
for i in range(N-1):
    if L[i] != L[i+1]:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
N=int(input())
hash = {}
count=0
for _ in range(N):
    s=input()
    if s in hash:
      continue
    else:
      hash[s]=1
      count+=1
print(count)

Submission status: Accepted

Solution code:
import collections

ts = int(input())
a = []
for i in range(ts):
    a.append(str(input()))
print(len(collections.Counter(a)))

Submission status: Accepted

Solution code:
import sys

if __name__ == "__main__":
    N = int(input())
    data = set()
    for _ in range(N):
        data.add(sys.stdin.readline().rstrip())
    print(len(data))

Submission status: Accepted

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

bbb = list(set(aaa))

ans = len(bbb)

print(ans)

Submission status: Accepted

Solution code:
N=int(input())
x=0
a=list()
while x<N:
    a.append(input())
    x=x+1
print(len(set(a)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
s={}
for i in range(n):
    tmp=input()
    if tmp in s:
        s[tmp]+=1
    else:
        s[tmp]=1
print(len(s))

Submission status: Accepted

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

Submission status: Accepted

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

s.sort()
ans=1
for i in range(1,n):
    
    if s[i-1]==s[i]:
        ans=ans-1
    ans+=1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
S=set()
for _ in range(n):
    s=str(input())
    if s in S:
        continue
    else:
        S.add(s)
print(len(S))

Submission status: Accepted

Solution code:
n = int(input())
s = []
p = set()
ans = 0
for i in range(n):
    s.append(input())
    if s[i] in p:
        pass
    else:
        p.add(s[i])
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
import collections
N = int(input())
S = list()
for i in range(N):
    S.append(str(input()))
c = collections.Counter(S)
values,counts = zip(*c.most_common())
print(len(values))

Submission status: Accepted

Solution code:
import collections

N = int(input())

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

T = collections.Counter(S)
print(len(T.keys()))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

# print(s)

print(len(s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    s = set()
    n = int(input())
    for _ in range(n):
        s.add(str(input()))
    print(len(s))
    
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())

k = []

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

print(len(set(k)))

Submission status: Accepted

Solution code:
# coding: utf-8

n = int(input())
S = set(input() for _ in range(n))

print(len(S))

Submission status: Accepted

Solution code:
n = int(input())
dic = {}
s = 0

for i in range(n):
    word = input()
    if word not in dic:
        dic[word]=1
        s += 1
print(s)

Submission status: Accepted

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

sc = list(set(s))

print(len(sc))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

itemCount = 0
itemList = {}

for i in range(N):
  item = input()
  if item in itemList:
    continue
  else:
    itemCount += 1
    itemList[item] = item

print(itemCount)

Submission status: Accepted

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

Submission status: Accepted

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

kind={}
for each in s:
    if each in kind.keys():
        kind[each]+=1
    else:
        kind[each]=1

print(len(kind.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())
set=set()
for _ in range(n):
    s=input()
    if s not in set:
        set.add(s)
print(str(len(set)))

Submission status: Accepted

Solution code:
N=int(input())
P = []
# 26進数で表していこう
for _ in range(N):
    prize = input()
    prize_num = 0
    for i,p in enumerate(prize[::-1]):
        prize_num += 26**i * ord(p)
    P.append(prize_num)

P.sort()
now=-1
count = 0
for p in P:
    if not p==now:
        now=p
        count+=1

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l = input()

s = []

for _ in range(int(l)):
    s.append(input())

# print(l, s)
# print(set(s))
print(len(set(s)))

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import itertools
import math
import string
import collections
from collections import Counter
from collections import deque
import sys
sys.setrecursionlimit(2*10**5)
INF = 2**60


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
N = int(input())
S = []
for i in range(N):
    S.append(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

print(c)

Submission status: Accepted

Solution code:
gachaNum=int(input())
items=set()
for i in range(gachaNum):
    items.add(input())

print(len(items))

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())
S=["" for j in range(N)]
for i in range(N):
    S[i]=input()
S.sort()
count=1
for i in range(1,N):
    if S[i]!=S[i-1]:
        count+=1
print(count)

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())
lotteries = []
for i in range(0,N):
    lotteries.append(input())

print(len(set(lotteries)))

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

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

Submission status: Accepted

Solution code:
i = int(input())

gift = dict()

# print(gift.get('aaa'))

for i in range(i):
  value = input()
  # print(value)
  # print(gift.get(value))
  if gift.get(value) == None:
    gift[value] = 1
  else:
    gift[value] += 1

# print(gift)

print(len(gift))

Submission status: Accepted

Solution code:
n=int(input())
dic=dict()
while n:
  temp=input()
  if temp not in dic:
    dic[temp]=1
  n-=1
print(len(dic))

Submission status: Accepted

Solution code:
n=int(input())
D={}
for i in range(n):
	a=input()
	if a not in D:
		D[a]=1
	else:
		D[a]+=1
print(len(D))

Submission status: Accepted

Solution code:
#import numpy as np
import math
#from fractions import gcd

def main():

    ##get int
    first_input = list(map(lambda x:int(x), input().split(" ")))
    #second_input = list(map(lambda x:int(x), input().split(" ")))

    ##get float
    #first_input = list(map(lambda x:float(x), input().split(" ")))
    #second_input = list(map(lambda x:float(x), input().split(" ")))

    ##get string
    #first_input = input().split(" ")

    N = first_input[0]

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

    print(len(set(keihin)))

if __name__ == '__main__':
    main()

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:
# -*- coding: utf-8 -*-

n = int(input())

kind = []

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

print(len(set(kind)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

count = len(list(set(a)))
print(count)

Submission status: Accepted

Solution code:
N = int(input())
S = ["" for _ in range(N)]
num = 1
for i in range(N):
  S[i] = input()
List = sorted(S)
for j in range(N-1):
  if List[j] != List[j+1]:
    num += 1
print(num)

Submission status: Accepted

Solution code:
N=int(input())

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

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

Submission status: Accepted

Solution code:
n = int(input())
s = [input() for i in range(n)]
#if n == 1:
#   print(1)
#else:
#    for in range 

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

Submission status: Accepted

Solution code:
import collections

def main():
    N = int(input())
    s = [input() for i in range(N)]
    c = collections.Counter(s)
    print(len(c))
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
#N, K = map(int, input().split())
N = int(input())
list = []
# 文字列の入力
for i in range(N):
    s = input()
    list.append(s)
    #if not s in list:
        #list.append(s)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict

N = int(input())

goods = defaultdict(lambda: 0)

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

print(len(goods))

Submission status: Accepted

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

s_lst = [input() for i in range(n)]
# print(s_lst)

# print(set(s_lst))
print(len(set(s_lst)))

Submission status: Accepted

Solution code:
a=int(input())

LST=[]


for i in range(a):
  LST.append(input())

Kekka=list(set(LST))  
print(len(Kekka))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = {input() for i in range(n)}
print(len(a))

Submission status: Accepted

Solution code:
raw_input = input().split()
n = int(raw_input[0])
items = [input().strip() for _ in range(n)]
items = set(items)
print(len(items))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

print(len(set(S)))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    import collections
    n = int(input())  # nは入力回数
    lis = [input() for _ in range(n)]
    print(len(collections.Counter(lis)))



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from collections import Counter
n = int(input())
s = [0] * n
for i in range(n):
  s[i] = input()
c = Counter(s)
print(len(c))

Submission status: Accepted

Solution code:
N = int(input())

keihin_dict = {}
for i in range(N):
  keihin = input()
  keihin_dict[keihin] = 1
  
print(len(keihin_dict))

Submission status: Accepted

Solution code:
inputLine=input()
N=int(inputLine)

S = []

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

S.sort()

result=1

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

print(result)

Submission status: Accepted

Solution code:
num = int(input())
set_item = set()
for i in range(num):
    item = input()
    set_item.add(item)
print(len(set_item))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#ABC 164C

n = int(input())

mylist = [input() for i in range(n)]
output = list(set(mylist))

print(len(output))