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:
#!/usr/bin/env python
import sys
from collections import Counter
from itertools import permutations, combinations
#from fractions import gcd
from math import gcd
from math import ceil, floor
import bisect
sys.setrecursionlimit(10 ** 6)
inf = float("inf")

def input():
    return sys.stdin.readline()[:-1]

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def resolve():
    '''
    code here
    '''
    N = int(input())
    S_list = [input() for _ in range(N)]

    print(len(set(S_list)))

if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

from collections import Counter
counter = Counter(s)
print(len(counter))

Submission status: Accepted

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

l.sort()
cnt=0
for i in range(n-1):
    if l[i]==l[i+1]:
        cnt+=1
print(len(l)-cnt)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

List_s = set(List)
print(len(List_s))

Submission status: Accepted

Solution code:
from sys import stdin
import collections

lines = stdin.readlines()
n = int(lines[0].rstrip())
s_n = [str(lines[i].rstrip()) for i in range(1, n+1, 1)]

c = collections.Counter(s_n)

print(len(c))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(len(s))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
list = {}
for i in range(N):
    A = str(input())
    list[A] = 1

print(len(list))

Submission status: Accepted

Solution code:
def func():
    return

n = int(input())

d = dict()
for i in range(n):
    s = input()
    d[s] = True
# a, b = map(int, input().split())
# a = list(map(int, input().split()))
# a = input().split()

ans = len(d)

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


for i in range(N):
    S.append(input())
print(len(list(set(S))))

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

Submission status: Accepted

Solution code:
from sys import stdin

n = int(input())
s = {stdin.readline().rstrip("\n") for _ in range(n)}
  
print(len(s))

Submission status: Accepted

Solution code:
print len(set([raw_input() for _ in range(int(raw_input()))]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter
def resolve():
    N = int(input())
    print(len(Counter(tuple([input() for i in range(N)]))))

if __name__ == '__main__':
    resolve()

Submission status: Accepted

Solution code:
num = input()
inplist = [input() for i in range(int(num))]

newlist = set(inplist)
print(len(newlist))

Submission status: Accepted

Solution code:
from sys import stdin
n = int(stdin.readline().rstrip())
a = [0]*n
for i in range(n):
    a[i] = stdin.readline().rstrip()
a = sorted(a)
answer = 1
for i in range(n-1):
    if a[i] != a[i+1]:
        answer += 1
print(answer)

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
S = []
for i in range(N):
  S.append(input())
print(np.unique(S).size)

Submission status: Accepted

Solution code:
n = int(input())
s_list = [input() for i in range(n)]
print(len(set(s_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,*S = open(0).read().split()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

def resolve():
    import sys
    input = sys.stdin.readline
    n = int(input())

    result = set()
    for _ in range(n):
        result.add(input().rstrip())
    print(len(result))



if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:

def resolve():
	n = int(input())
	s = []
	d = {}
	ans = 0
	for _ in range(n):
		s.append(input())
	for i in s:
		if not d.get(i):
			ans += 1
			d[i] = True
	print(ans)
resolve()

Submission status: Accepted

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

#print(S[1][0])
uniqued=set(S)
print(len(uniqued))

Submission status: Accepted

Solution code:
from math import ceil #切り上げ

def inp(): return int(input()) #一個だけ読み取り
def inpm(): return map(int,input().split()) #mapオブジェクトで呼び出し
def inpl(): return list(map(int, input().split())) #数字リストをintで
def inpls(): return list(input().split()) #リストをstrで

str_list = []
for i in range(inp()):
  str_list.append(input())
  
print(len(set(str_list)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

number_of_types = len(set(S))

print(number_of_types)

Submission status: Accepted

Solution code:
import collections

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

print(len(c))

Submission status: Accepted

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

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())
List = [input() for i in range(n)]
List_2 = list(set(List))
print(len(List_2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

print(len(set(input() for _ in range(N))))

Submission status: Accepted

Solution code:
N=int(input())
dic={}
for i in range(N):
  tmp=input()
  if tmp not in dic:
    dic[tmp]=1
  else:
    dic[tmp]+=1

print(len(dic))

Submission status: Accepted

Solution code:
n = int(input())

d = {}
for _ in range(0, n):
    s = input()
    d[s] = 1


print(list(d).__len__())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(N):
    myset.add(input())
    
print(len(myset))

Submission status: Accepted

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

d = {}

for i in S:
    if i in d:       
        continue
    else:
        d[i] = 1

print(len(d))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

dic = {}
ans = 0

for _ in range(N):
  S = input()
  if not S in dic:
    ans += 1
    dic[S] = True

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

print(len(s))

Submission status: Accepted

Solution code:
import sys
input=lambda :sys.stdin.readline().rstrip()
n = int(input())
S = [input() for _ in range(n)]

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

Submission status: Accepted

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

mydict = {}

for s in S:
    if s in mydict:
        mydict[s] += 1
    else:
        mydict.setdefault(s, 1)

print(len(mydict.keys()))

Submission status: Accepted

Solution code:
from sys import stdin

def main():

    input = stdin.readline

    N = int(input())

    A = []
    for _ in range(N):
        A.append(input())
    
    print(len(set(A)))
    
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from collections import Counter
n = int(input())
m = []
for i in range(n):
    m.append(input())
count = Counter(m)
keys, values = zip(*count.most_common())
print(len(keys))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input(''))
s={}
for a in range(n):
    t=input('')
    if t in s:
        p=0
    else:
        s[t]=1

print(len(s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
from collections import defaultdict
d=defaultdict(int)
for i in range(n):
    key=input()
    d[key]+=1
d=list(dict(d))
print(len(d))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 標準入力の取得
N = int(input())
S = [input() for i in range(N)]

# 求解処理
result = len(set(S))

# 結果出力
print(result)

Submission status: Accepted

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

item = list(set(item))
print(len(item))

Submission status: Accepted

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

Submission status: Accepted

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

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

print(len(set(name_list)))

Submission status: Accepted

Solution code:
def gacha(sl):
    print(len(set(sl)))

n = int(input())
sl = []
for _ in range(n):
    sl.append(input())
# print(sl)

gacha(sl)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(l)))

Submission status: Accepted

Solution code:
N = int(input())

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

print(len(set(S)))

Submission status: Accepted

Solution code:
N = int(input().rstrip())
Ss = []
d = {}
for _ in range(N):
    d[input().rstrip()] = 1
print(len(d.keys()))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

s_set = set(s)

print(len(s_set))

Submission status: Accepted

Solution code:
N = int(input())
gacha_list = []
count = 0
for i in range(N):
    S = input()
    gacha_list.append(S)
gacha_list = list(set(gacha_list))

print(len(gacha_list))

Submission status: Accepted

Solution code:
n=int(input())
a=[]
count=0
for i in range(n):
	element=input()
	a.append(element)
for i in range(len(set(a))):
	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())
S = [""] * N
for i in range(N):
    S[i] = input()

from collections import Counter

cnt = Counter(S)

print(len(cnt))

Submission status: Accepted

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

kind = 1
S.sort()
s_old = S[0]
for i in range(1,N):
    if S[i] != s_old:
        kind += 1
    s_old = S[i]

print(kind)

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:
import collections
n=int(input())
s=[]
for i in range(n):
  S=input()
  s.append(S)
l=collections.Counter(s)
print(len(l))

Submission status: Accepted

Solution code:
N = int(input())  #数字
S = list(input() for i in range(N))  #スペース抜きの単語を複数行

S = set(S)

print(len(S))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

prizes = [input() for _ in range(N)]

prizes_set = set(prizes)
print(len(prizes_set))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(s_list)))

Submission status: Accepted

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

print(len(set(array)))

Submission status: Accepted

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

Submission status: Accepted

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

a_unique = list(set(a))

print(len(a_unique))

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(s)))

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

print(len(d))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
d=dict()
for _ in range(n):
    s=input()
    if s not in d:
        d[s]=0

print(len(d))

Submission status: Accepted

Solution code:
#coding:utf-8

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

Goods=dict()
res=0
for s in S:
	if s not in Goods:
		Goods[s]=1
		res+=1
print(res)

Submission status: Accepted

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

import collections
print(len(collections.Counter(S)))

Submission status: Accepted

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

    A.sort()
    count = 1
    if N != 1:
        for i in range(1, N):
            if A[i - 1] != A[i]:
                count += 1
    print(count)


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
from sys import stdin
import math
import fractions

n = int(stdin.readline().rstrip())

s = [0] * n

for i in range(n):
    s[i] = stdin.readline().rstrip()

result = {}
for ss in s:
    result[ss] = 1

print(len(result))

Submission status: Accepted

Solution code:
N = int(input())
ret = {}
for i in range(N):
    ret[input()] = 0
print(len(ret.keys()))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
@author: H_Hoshigi
"""
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())
strs=set()
for i in range(0,n):
    temp=input()
    strs.add(temp)
print(len(strs))

Submission status: Accepted

Solution code:
n = int(input())
look_up = {}
for i in range(n):
    item = input()
    if item in look_up:
        look_up[item] += 1
    else:
        look_up[item] = 0

print(len(look_up))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

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

c= collections.Counter(list)

m=0
for i in c.values():
    m+=1

print(m)

Submission status: Accepted

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

print(len(set(s)))

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

from collections import Counter


n = int(input())
S = [input().strip() for _ in range(n)]

COUNTS = Counter(S)

print(len(COUNTS))

Submission status: Accepted

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

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

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:
from collections import defaultdict
n = int(input())
r = defaultdict(int)
for i in range(n):
    s = input()
    r[s] +=1
print(len(r.keys()))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

goods=[]

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

print(len(set(goods)))

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

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

print(len(set(string_list)))

Submission status: Accepted

Solution code:
import collections
N = int(input())
S = [str(input()) for _ in range(N)]
k = collections.Counter(S)
ans = 0
for k in k.keys():
    ans += 1
print(ans)

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

Submission status: Accepted

Solution code:

#!/usr/bin/env python3
n = int(input())
s = set()
for i in range(n):
    k = input()
    s.add(k)
print(len(s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

dic = {}

for gift in gift_lis:
    if gift in dic:
        dic[gift] += 1
    else:
        dic[gift] = 1

n = 0

for num in dic:
    n += 1

print(n)

Submission status: Accepted

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

S = list(set(S))

print(len(S))

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

print(len(set(reword)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
lst = []
ans = 1

for i in range(n):
  lst.append(input())
#
lst.sort()
#print(lst)
pre = lst[0]
for s in lst[1:]:
  #print(s)
  if pre != s:
    ans += 1
  pre = s
  
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
d = {}
for rep in range(n):
	s = input()
	if s not in d:
		d[s] = 1
print(len(d))

Submission status: Accepted

Solution code:
N = int(input())

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

print(len(set(keihin)))

Submission status: Accepted

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

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

print(len(list(set(s_list))))

Submission status: Accepted

Solution code:
n = int(input())

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

print(len(keihin))

Submission status: Accepted

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

import collections

c = collections.Counter(S)

print(len(c))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import *
from copy import *
from string import *				# alpha = ascii_lowercase
from random import *
from sys import stdin
from sys import maxsize
from operator import *				# d = sorted(d.items(), key=itemgetter(1))
from itertools import *
from collections import Counter		# d = dict(Counter(l))
import math

def bin1(l,r,k,t,b,val,ans):
	if(l>r):
		return ans
	else:
		mid=(l+r)//2
		v=k**mid
		if(v==val):
			return v
		elif(v>val):
			ans=mid
			return bin1(mid+1,r,k,t,b,val,ans)
		else:
			return bin1(l,mid-1,k,t,b,val,ans)
		
def bin2(l,r,k,t,b,val,ans):
	if(l>r):
		return ans
	else:
		mid=(l+r)//2
		v=t*(k**mid)+b*(mid)
		if(v==val):
			return v
		elif(v>val):
			ans=mid
			return bin2(l,mid-1,k,t,b,val,ans)
		else:
			return bin2(mid+1,r,k,t,b,val,ans)

def SieveOfEratosthenes(n): 
      
    # Create a boolean array "prime[0..n]" and initialize 
    #  all entries it as true. A value in prime[i] will 
    # finally be false if i is Not a prime, else true. 
    prime = [True for i in range(n+1)] 
    p = 2
    while (p * p <= n): 
          
        # If prime[p] is not changed, then it is a prime 
        if (prime[p] == True): 
              
            # Update all multiples of p 
            for i in range(p * p, n+1, p): 
                prime[i] = False
        p += 1
    l=[]
    for i in range(2,n+1):
    	if(prime[i]):
    		l.append(i)
    return l
def bin(l,r,ll,val):
	if(l>r):
		return -1
	else:
		mid=(l+r)//2
		if(val>=ll[mid][0] and val<=ll[mid][1]):
			return mid
		elif(val<ll[mid][0]):
			return bin(l,mid-1,ll,val)
		else:
			return bin(mid+1,r,ll,val)
def deci(n):
	s=""
	while(n!=0):
		if(n%2==0):
			n=n//2
			s="0"+s
		else:
			n=n//2
			s="1"+s
	return s
def diff(s1,s2):
	if(len(s1)<len(s2)):
		v=len(s1)
		while(v!=len(s2)):
			s1="0"+s1
			v=v+1
	else:
		v=len(s2)
		while(v!=len(s1)):
			s2="0"+s2
			v=v+1
	c=0
	for i in range(len(s1)):
		if(s1[i:i+1]!=s2[i:i+1]):
			c=c+1
	return c
from sys import stdin, stdout 
def fac(a,b):
	v=a
	while(a!=b):
		v*=a-1
		a=a-1
	return v
def bino(l,r,n):
	if(l>r):
		return -1
	else:
		mid=(l+r)//2
		val1=math.log((n/mid)+1,2)
		val2=int(val1)
		if(val1==val2):
			return val1
		elif(val1<1.0):
			return bino(l,mid-1,n)
		else:
			return bino(mid+1,r,n)

def binary(l,r,ll,val,ans):
	if(l>r):
		return ans
	else:
		mid=(l+r)//2
		if(val%ll[mid]==0):
			ans=ll[mid]
			return binary(l,mid-1,ll,val,ans)
		else:
			return binary(l,mid-1,ll,val,ans)
def odd(n,ans,s):
	if(n%2!=0 or n in s):
		return ans
	else:
		s.add(n)
		return odd(n//2,ans+1,s)

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

Submission status: Accepted

Solution code:
from collections import Counter

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

s = Counter(S)
print(len(s))

Submission status: Accepted

Solution code:
n = int(input())

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

print(len(set(s_list)))

Submission status: Accepted

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

for i in range(N):
    item = input()
    items.append(item)    
items.sort()
cnt = 0
before = ""
for index,item in enumerate(items):
    if index == 0:
        cnt += 1    
    elif before != item:
        cnt += 1
    before = item
print(cnt)

Submission status: Accepted

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

def main():
    n = int(input())
    set_ = set()
    for i in range(n):
        set_.add(input())

    print(len(set_))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    hoge = {}
    for _ in range(n):
        s = input()
        hoge[s] = 1
    print(len(hoge.keys()))

if __name__ == '__main__':
    main()