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

Submission status: Accepted

Solution code:
myset = set()

N = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

d = {}
for _ in range(N):
    S = input()
    d.setdefault(S, 0)
    d[S] += 1
print(len(d.keys()))

Submission status: Accepted

Solution code:
n = int(input())
obj= []
for i in range (n):
	obj.append(input())
dictOfElems = dict()
for elem in obj:
  if elem in dictOfElems:
    dictOfElems[elem] += 1
  else:
    dictOfElems[elem] = 1
print(len(dictOfElems))

Submission status: Accepted

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

import sys
sys.setrecursionlimit(300000)


def solve(N: int, S: "List[str]"):
    s = set(S)
    ret = len(s)
    print(ret)
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    S = [next(tokens) for _ in range(N)]  # type: "List[str]"
    solve(N, S)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.buffer.readline
def even(n): return 1 if n%2==0 else 0
from collections import defaultdict
n = int(readline())
lst1 = []
dic1 = defaultdict(int)
for i in range(n):
    dic1[readline().rstrip().decode('utf-8')] += 1
print(len(list(dic1.values())))

Submission status: Accepted

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

print(len(st))

Submission status: Accepted

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

s2 = list(set(s))


print(len(s2))

Submission status: Accepted

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

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())
a = list()
p = list()
for x in range(N):
    a.append(input())
p=set(a)
print(len(p))

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(N):
  input_line = input()
  if input_line not in gacha_list:
    gacha_list.add(input_line)
    
print(len(gacha_list))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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


import collections

c = collections.Counter(List)

print(len(c))

Submission status: Accepted

Solution code:
import collections

n = int(input())
a = [input() for i in range(n)]
b = collections.Counter(a)
print(len(b))

Submission status: Accepted

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

for _ in range(N):
    L.append(input())
def counter(array):
    from collections import Counter
    return list(Counter(array).most_common())

c = counter(L)
print(len(c))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

def main():
    n = input()
    s = {}
    while int(n)>0:
        m = input()
        if m in s:
            s[m]+=1
        else:
            s[m]=1
        n = int(n) - 1
    print(len(s))
    return 0

main()

Submission status: Accepted

Solution code:
n = int(input())
s = []
for i in range(n):
    s += map(str, input().split())
print(len(set(s)))

Submission status: Accepted

Solution code:
from collections import Counter
n=int(input())
lst=[]
k=n
while(n>0):
    t=input("")
    lst.append(t)
    n-=1
distinct_list= (Counter(lst).keys())
print(len(distinct_list))

Submission status: Accepted

Solution code:
from collections import Counter
n = int(input())
s = [input() for i in range(n)]
#print(s)
sc = Counter(s)
sc = list(sc.items())

print(len(sc))

Submission status: Accepted

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

#文字列の入力
gift_list = [input() for i in range(N)]

#要素の種類
print(len(set(gift_list)))

Submission status: Accepted

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

#リスト
gift=[input()for i in range(N)]

#種類判定
print(len(set(gift)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

i = 0
item_list = []

while i < N:
  item = input()
  item_list.append(item)
  i += 1
#while_end

print(len(set(item_list)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=input()
n=int(n)
i=0
d=dict()
while i<n:
	s=input()
	d[s]=d.get(s,0)+1
	i+=1
print(len(d.keys()))

Submission status: Accepted

Solution code:



class Main:
    N = int(input());
    s = set([input() for i in range(N)]);
    print(len(s))

Submission status: Accepted

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

for i in range(n):
	s = input()
	if len(s)>=5:
		A.add(s)
	else:
		B.add(s)
		
print(len(A)+len(B))

Submission status: Accepted

Solution code:
num=int(input())
something=[]
while(num):
    temp=input()
    something.append(temp)
    num-=1
something_set=set(something)
print(len(something_set))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
dic = {}
s = []
for i in range(0,N):
    s = input()
    if not s in dic:
        dic[s] = 1

print(len(dic))

Submission status: Accepted

Solution code:
t = int(input())
d = {}
cnt = 0
while(t):
  s = input()
  if(s not in d.keys()):
    d[s] = 1
    cnt+=1
  t-=1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(0,N):
      S=str(input(""))
      L.append(S)

seta=(set(L))
print(len(seta))

Submission status: Accepted

Solution code:


def cal():
    number = int(input())
    strList = []
    for i in range(number):
        temp = input()
        strList.append(temp)

    count = {}

    for item in strList:
        count[item] = count.get(item, 0) + 1
    print(len(count))


cal()

Submission status: Accepted

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

Submission status: Accepted

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

s_n = set(s)
m = len(s_n)

print(m)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
newlst = []
lst =[]
m = int(input())
while m > 0:
    a = str(input())
    lst.append(a)
    m = m -1
newlst = list(dict.fromkeys(lst))
print(len(newlst))

Submission status: Accepted

Solution code:
#coding UTF-8
from collections import Counter
n= int(input())#1行目のNを取得する
l=[input()for i in range(n)] #複数行の数値の入力を取得
c=Counter(l)

print(len(c))

Submission status: Accepted

Solution code:
n=int(input())

t_dict = dict()
for i in range(n):
    type_ = input()
    t_dict[type_] =  t_dict.get(type_,1)

    
print(len(t_dict))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import os,sys,time                   # import modules


n = int(input(''))
arr = []

for idx in range(0,n):
    arr.append(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

List=[input() for i in range(n)]
List = set(List)

print(len(List))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

loveyou = int(input())
reject= [0] * loveyou
for n in range(0,loveyou):
    reject[n] = input()
sherejected = list(dict.fromkeys(reject))
print(len(sherejected))

Submission status: Accepted

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

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:
n=int(input())
s=list(input() for _ in range(n))

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

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(S_list)))

Submission status: Accepted

Solution code:
import collections

N = int(input())

l = list()

for i in range(1, N+1):
    l.append(input())

c = collections.Counter(l)

print(len(c))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
from sys import stdin, setrecursionlimit, stdout
#setrecursionlimit(1000000)
from collections import deque
from math import sqrt, floor, ceil, log, log2, log10, pi, gcd, sin, cos, asin
def ii(): return int(stdin.readline())
def fi(): return float(stdin.readline())
def mi(): return map(int, stdin.readline().split())
def fmi(): return map(float, stdin.readline().split())
def li(): return list(mi())
def lsi():
    x=list(stdin.readline())
    x.pop()
    return x
def si(): return stdin.readline().rstrip()
#mod=1000000007
res=['Yes', 'No']
############# CODE STARTS HERE #############
a=set()
for _ in range(ii()):
    a.add(si())
print(len(a))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(len(list(set(p))))

Submission status: Accepted

Solution code:
n = int(input())
t = []
for i in range(677):
    t.append([])
x = n
for i in range(n):
    a = input()
    if(len(a) < 4):
        if(a in t[0]):
            x -= 1
        else:
            t[0].append(a)
    else:
        p = ord(a[0])*26+ord(a[1])-2618
        if(a[2:] in t[p]):
            x -= 1
        else:
            t[p].append(a[2:])
print(x)

Submission status: Accepted

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

def main():
    N = int(input())
    S = [s.rstrip() for s in sys.stdin.readlines()]
    count = 0

    memo = sorted(S)

    for i in range(N - 1):
        if memo[i] == memo[i + 1]:
            count += 1
        
    print(N - count)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = [input() for i in range(1)] 
li = list(map(int, s[0].split()))
n = li[0]
t = [input() for j in range(n)]
t_unique = list(set(t))
print(len(t_unique))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


def solve(N: int, S: "List[str]"):

    S = set(S)

    print(len(S))

    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    S = [next(tokens) for _ in range(N)]  # type: "List[str]"
    solve(N, S)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
a = []
ans = 0
for i in range(n):
    b = input()
    a+=[b]
c = sorted(a)
b = 0
for i in range(n-1):
    if c[i] == c[i+1]:
        b += 1

print(n-b)

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:
n = int(input())
my_set = set([])

for i in range(0, n):
  my_set.add(str(input()))
  
print(len(my_set))

Submission status: Accepted

Solution code:
def main():
  n = int(input())
  #s = input()
  #s = input().split()
  #a,b,c,d = list(map(int,input().split()))
  s = [input() for i in range(n)]
  #a = [int(input()) for i in range(n)]
  #a = [input().split() for i in range(n)]
  #a = [list(map(int,input().split())) for i in range(n)]
  ans = 0
  count = 0
  lis = []
  
  for i in set(s):
    count += 1
  print(count)
  
if __name__ == '__main__':
  main()

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

Submission status: Accepted

Solution code:
import collections
a = int(input())
list = []

for b in range(a):
	i = input()
	list.append(i)

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

Submission status: Accepted

Solution code:
import collections

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

l = list()

N= input()
for i in range(int(N)):
  a_i = input()
  l.append(a_i)
  
c = collections.Counter(l)
print(len(c))

Submission status: Accepted

Solution code:
num = int(input());

mylist_1=[];
mylist_2=[];
mylist_3=[];
mylist_4=[];
mylist_5=[];
mylist_6=[];
mylist_7=[];
mylist_8=[];
mylist_9=[];
mylist_10=[];

for i in range(num):
  s = input();
  if len(s) == 1:
    mylist_1.append(s);
  elif len(s) == 2:
    mylist_2.append(s);
  elif len(s) == 3:
    mylist_3.append(s);
  elif len(s) == 4:
    mylist_4.append(s);
  elif len(s) == 5:
    mylist_5.append(s);
  elif len(s) == 6:
    mylist_6.append(s);
  elif len(s) == 7:
    mylist_7.append(s);
  elif len(s) == 8:
    mylist_8.append(s);
  elif len(s) == 9:
    mylist_9.append(s);
  elif len(s) == 10:
    mylist_10.append(s);
    

m1 = len(list(set(mylist_1)));
m2 = len(list(set(mylist_2)));
m3 = len(list(set(mylist_3)));
m4 = len(list(set(mylist_4)));  
m5 = len(list(set(mylist_5)));
m6 = len(list(set(mylist_6)));
m7 = len(list(set(mylist_7)));
m8 = len(list(set(mylist_8)));
m9 = len(list(set(mylist_9)));
m10 = len(list(set(mylist_10)));

m = m1 + m2 + m3 + m4 + m5 + m6 + m7 + m8 + m9 + m10;
print(m);

Submission status: Accepted

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

N = int(readline())
S = set()
for i in range(N):
    S.add(readline().strip())
print(len(S))

Submission status: Accepted

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

Submission status: Accepted

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

print(len(S))

Submission status: Accepted

Solution code:
a = int(input())
l = [input() for i in range (a)]
d = {}
for i in l:
    if i in d:
        d[i] += 1
    else:
        d[i] = 1
answer_list = list(d.keys())
answer = len(answer_list)
print(answer)

Submission status: Accepted

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

Submission status: Accepted

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

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:
num=int(input())
lst=[]
if 1<=num<=2*10**5:
    lst=[input() for i in range(num)]
    print(len(set(lst)))

Submission status: Accepted

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

print(len(Counter(list)))

Submission status: Accepted

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

print(len(list(set(items))))

Submission status: Accepted

Solution code:
d = {}
ans = 0;
N = int(input())
for i in range(N):
    key = input()
    if key not in d:
        ans+=1
        d[key] = 0
        
        
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
l = []
for i in range(N):
    l.append(input())
k = sorted(l)
ans = 0
a = 0
for i in range(N):
    if k[i]!=a:
        ans+= 1
        a = k[i]
print(ans)

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

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

Submission status: Accepted

Solution code:
# 入力1行目を要素数として受け取る
N = int(input())
s = []

# 入力2行目以降をリストに要素として追加していく
for i in range(N):
    s.append(input())

#　リストから重複したものを排除し、要素を数える
print(len(set(s)))

Submission status: Accepted

Solution code:
N = int(input()) #1行目のNを取得する
s = [input() for i in range(N)] #複数行の数値の入力を取得
b = list(set(s))
print(len(b))

Submission status: Accepted

Solution code:
import sys

def main():

	N = int(input())
	
	d = {}
	for i in range(N):
		A = input()
		d[A] = 0
	print(len(d))
	
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(len(result))

Submission status: Accepted

Solution code:
N=int(input())
S=['']*N
count=0

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

# s=collections.Counter(S)
# print(len(s))
print(len(set(S)))

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

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

print(len(c))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
s=set()
while n:
    str=input()
    if str not in s:
        s.add(str)
    n-=1
print(len(s))

Submission status: Accepted

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

count = 1

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

print(count)

Submission status: Accepted

Solution code:
def hahaha():
    n=int(input())
    count=1
    list=[]
    for i in range(0,n):
        list.append(str(input()))
    list.sort()
    a=list[0]
    for j in range(0,n):
        if a!=list[j]:
            a=list[j]
            count+=1
    print(count)
if __name__ == '__main__':
    hahaha()

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

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

A = collections.Counter(S)

print(len(A))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def io():
  s = set()
  N = int(input())
  for i in range(N):
    S = input()
    s.add(S)
  print(len(s))
  
if __name__=='__main__':
  io()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import collections

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


c = collections.Counter(s)
#N = len(count)


ans_list = list(c.values())
ans=0
for i in range(len(ans_list)):
  if ans_list[i]>=2:
    ans+=1
  else:
    ans+=1
    
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
str_list = [input() for _ in range(n)]
ans_list = list(set(str_list))

print(len(ans_list))

Submission status: Accepted

Solution code:
i = int(input())
x = set()
for j in range(i):
    x.add(str(input()).lower())
print(len(x))

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
get_num=int(input())
get_list=[]
count=0

for i in range(get_num):
    tmp=input()
    get_list.append(tmp)

list=list(set(get_list))
    
print(len(list))

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())
r=1
l=[]
for i in range(n):
  l.append(input())
l.sort()
for i in range(n-1):
  if l[i]!=l[i+1]:
    r+=1
  
print(r)

Submission status: Accepted

Solution code:
import sys
import re

N = int(input())
A = sys.stdin.readlines()
#改行コード削除
A = [b.strip() for b in A]


print(len(list(set(A))))

#print(N)
#print(A)
#print(min(A))

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#C gacha
n = int(input())
seq = []

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

Submission status: Accepted

Solution code:
n = int(input())
s = [""]*n
for i in range(n):
  si = str(input())
  s[i] = si
s.sort()
c = 0
s.append("A")
for i in range(n):
  if s[i] != s[i+1]:
    c += 1
print(c)

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 i in range(N)]

print(len(set(S)))

Submission status: Accepted

Solution code:
n = int(input())

l = list()
c = 0

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

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

Submission status: Accepted

Solution code:
#coding: UTF-8

if __name__ == "__main__":
    N = int(input())

    fruits = []

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

    print(len(set(fruits)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())#入力回数を決める
num=[input() for i in range(N)]
num_a=list(set(num))

print(len(num_a))

Submission status: Accepted

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

Submission status: Accepted

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

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())
K=[]
z=0
for x in range(N):
    k=input()
    K.append(k)
T=set(K)
y=len(T)
print(y)

Submission status: Accepted

Solution code:
n = int(input())  # 入力の1行目が要素数の場合

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

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

Submission status: Accepted

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

print(len(t))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

s = int(input())  #nは入力回数
s_list = [input() for _ in range(s)]
# print(s_list)   # 出力を確認

ans = 0

s_list = set(s_list)

print(len(s_list))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
D = dict()
for i in range(N):
    S = input()
    if S not in D.keys():
        D[S] = 1
    D[S] += 1

print(len(D))

Submission status: Accepted

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

set=set()

for i in range(N):
    set.add(P[i])

print(len(set))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

print(len(np.unique(S)))

Submission status: Accepted

Solution code:
import sys
import os

def file_input():
    f = open('../Beginner_Contest_164/input.txt', 'r')
    sys.stdin = f

def main():
    #file_input()
    # A,B,C,D=map(int, input().split())
    N = int(input())

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

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

    print(len(S))

    # S = {}
    # val=0
    # for i in range(N):
    #     str = input()
    #     if S.get(str) == None:
    #         S[val]=str
    #         val+=1
    #
    # print(val)

    # val = 0
    # str = ""
    # for i in range(N):
    #     in_str = input()
    #     if str.find(in_str):
    #         str += " "+in_str
    #         val += 1
    #
    # print(val)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:

#a,b=(int(x) for x in input().split()) #数値の時

a=int(input())

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

Submission status: Accepted

Solution code:
lottory_drew = int(input())
words = []

for word in range(lottory_drew):
    words.append(input())

print(len(set(words)))

Submission status: Accepted

Solution code:
lot_num = int(input())

print(len({input() for i in range(0, lot_num)}))

Submission status: Accepted

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

a = list(set(string_list))

print(len(a))

Submission status: Accepted

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