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:

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

if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

Submission status: Accepted

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


def main():
  names = set()

  for _ in range(int(input())):
    names.add(input().strip())

  print(len(names))


if __name__ == '__main__':
  main()

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())
    
print(len(set(S)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

S_dict = {}

for i in range(N):
  S = str(input())
  S_dict[S] = S_dict.get(S,0) + 1

print(len(S_dict))

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:
Row = int(input())
List = [input() for i in range(Row)]
# print(Row)
# print(List)
# print(List.count("apple"))

# print(list(set(List)))
newList = list(set(List))
# print(newList)

print(len(newList))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from __future__ import division, print_function
import sys
if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip

import os, sys, bisect, copy
from collections import defaultdict, Counter, deque
#from functools import lru_cache   #use @lru_cache(None)
if os.path.exists('in.txt'): sys.stdin=open('in.txt','r')
if os.path.exists('out.txt'): sys.stdout=open('out.txt', 'w')
#
def input(): return sys.stdin.readline()
def mapi(arg=0): return map(int if arg==0 else str,input().split())
#------------------------------------------------------------------

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

Submission status: Accepted

Solution code:
N=int(input())
SS=set()
while N!=0:
  S=input()
  SS.add(S)
  N=N-1
print(len(SS))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

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

print(len(c))

Submission status: Accepted

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

m=0
lis.sort()
for i in range(n-1):
    if lis[i]==lis[i+1]:
        m+=1

print(int(n-m))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print(len(S))

Submission status: Accepted

Solution code:
def main():

    n = int(input())
    db = set()

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

    print(len(db))

main()

Submission status: Accepted

Solution code:
n=int(input())
cnt=0
s=set()
for i in range(n):
    s1=input()
    if s1 not in s:
        cnt+=1
        s.add(s1)
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

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

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

Submission status: Accepted

Solution code:
n = int(input())

a = {}
for i in range(n):
    s = input()
    a[s] = 1

print(len(a))

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:
# Problem C - gacha

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

# initialization
s_list = list(set(s_list))
ans = len(s_list)

# output
print(ans)

Submission status: Accepted

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

for i in range(n):
  gacha.append(input())
print(len(set(gacha)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Code for C - gacha
# Use input() to fetch data from STDIN
n = int(input())

a = {}
for x in range(n):
    s = input()
    a[s] = 1

print(len(a.keys()))

Submission status: Accepted

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

for _ in range(n):
    s = input()
    S.add(s)

print(len(S))

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

print(len(set(input() for i in range(time))))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

items = set()

for i in range(n):
  items |= {input()}
  
print(len(items))

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

shop_item = []*number

for i in range(0,number):
    shop_item.append(input())

print(len(set(shop_item)))

Submission status: Accepted

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

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

print(len(d))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

list_set = set(keihin) 
unique_list = (list(list_set)) 
print(len(unique_list))

Submission status: Accepted

Solution code:
n = int(input())
d = {}
for i in range(n):
    s = input()
    d.setdefault(s,len(d)+1)
print(len(d))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve():
    from sys import stdin
    lines = stdin
    
    N = int(lines.readline())
    
    giveaway = set(lines.readlines())
    
    print(len(giveaway))

solve()

Submission status: Accepted

Solution code:
from sys import stdin
N = int(stdin.readline().rstrip())
S = [stdin.readline().rstrip() for _ in range(N)]
print(len(list(set(S))))

Submission status: Accepted

Solution code:
import sys
n = int(input().strip())
items = set()
for _ in range(n):
  items |= {sys.stdin.readline().strip()}
print(len(items))

Submission status: Accepted

Solution code:
def resolve():

    n = int(input())
    gacha_list=[input() for i in range(n)]
    gacha_prize=list(set(gacha_list))
    print(len(gacha_prize))
    
resolve()

Submission status: Accepted

Solution code:
from pip._vendor.distlib.compat import raw_input

n = int(raw_input())
items = set()
for i in range(n):
    items.add(raw_input())
print(len(items))

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

print(len(all))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(s_list)))

Submission status: Accepted

Solution code:
import sys

items = []

for _ in range(int(sys.stdin.readline())):
    si = sys.stdin.readline().split()[0]
    items.append(si)


print(len(set(items)))

Submission status: Accepted

Solution code:
items = []

for i in range(int(input())):
    items.append(input())
set = set(items)
print(len(set))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = set()
i = 1
while i <= N:
   S.add(input())
   i += 1
print(len(S))

Submission status: Accepted

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

Submission status: Accepted

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

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:
l = {}
N = int(input().rstrip())
for i in range(N):
    k = input().rstrip()
    l[k] = 0
    

print(len(l))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
list1 = set()
for i in range(N):
    taisho = input()
    if not taisho in list1:
        list1.add(taisho)
print(len(list1))

Submission status: Accepted

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

print(len(set(s)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
all_prize = {}
for i in range(N):
    prize = input()
    if prize in all_prize.keys():
        all_prize[prize] += 1
    else:
        all_prize[prize] = 1

print(len(all_prize))

Submission status: Accepted

Solution code:

def main():
    N = int(input().strip())
    S = []
    for i in range(N):
        s = input().strip()
        S.append(s)
    print(len(set(S)))


if __name__ == "__main__":
    main()

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

Submission status: Accepted

Solution code:
N = int(input())
S = {input() for _ in range(N)}

print(len(S))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

n = int(stdin.readline().rstrip())
s = [x.replace("\n", "") for x in stdin.readlines()]
sg = set(s[:n])
print(len(sg))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
slist = []
for i in range(n):
    news = str(input())
    slist.append(news)
# print(slist)
slist_u = list(set(slist))
# print(slist_u)
slist_u_len = len(slist_u)
print(slist_u_len)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
count = int(input())

strlist = set()
for i in range(count):
  strlist.add(input())

print(len(strlist))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:

l = input().split()
a = int(l[0])

setL = set()
while a > 0:
    setL.add(input())
    a-=1
print(len(setL))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

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


new_str1 = sorted(str1)



count=0
for i in range( N-1 ) :
    if new_str1[i] != new_str1[i+1] :
        count=count+1

print(count+1)

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 = input()
n = int(N)
a = {input() for i in range(n)}  
print(len(a))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10**7)
readline = sys.stdin.readline
# readlines = sys.stdin.buffer.readlines
ns = lambda: readline().rstrip()
ni = lambda: int(readline().rstrip())
nm = lambda: map(int, readline().split())
nl = lambda: list(map(int, readline().split()))

n = ni()
l = [input() for _ in range(n)]
print(len(set(l)))

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
items={1}
for i in range(0,n):
  items.add(input())
print(len(items)-1)

Submission status: Accepted

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

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

print(len(set(ar)))

Submission status: Accepted

Solution code:
n = int(input())

ans = len(set(input() for i in range(n)))

print(ans)

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
N = int(input())
A = list(range(N))
for i in range(N):
    A[i] = input()

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

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())
s = []

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

print(len(set(s)))

Submission status: Accepted

Solution code:
n = int(input())
item = {}
for i in range(n):
  it = input()
  item[it] = 'y'
print(len(item))

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())
l=[]
while n > 0:
  a=str(input())
  l.append(a)
  n-=1
l=set(l)
print(len(l))

Submission status: Accepted

Solution code:
# C

inputs = input()
N =int(inputs)

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l = []

a = int(input())

cnt = 0
while cnt < a:
    data = input()
    l.append(data)
    cnt = cnt + 1

# print(l)
# print(set(l))
print(len(set(l)))

Submission status: Accepted

Solution code:
n = int(input())
#set内包表記により重複を排除
s={str(input()) for i in range(n)}
print(len(s))

Submission status: Accepted

Solution code:
N = int(input())
A = {}
for i in range(N):
  S = str(input())
  if S not in A:
    A[S] = 1
  else:
    A[S] = 1
print(len(A))

Submission status: Accepted

Solution code:
import collections

#くじ引き回数の抽出
draw_count = int(input())

#景品をリストに格納
item = [input() for i in range(draw_count)]

#景品の種類とその要素数を辞書型に格納
item_type = collections.Counter(item)

#景品の種類を表示
print(len(item_type))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

d = {}
for _ in range(N):
  s = input()
  d[s]=0
  
print(len(d))

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 solve(n, s):
    return len(set(s))

n = int(input())
s = [input() for i in range(n)]
print(solve(n, s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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())
#print(n)
s = []
for _ in range(n):
  s.append(input())

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

Submission status: Accepted

Solution code:
# encoding="UTF-8"

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

print(len(S))

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
n = int(input())
x = set()
for _ in range(n):
  x.add(input().rstrip())
print(len(x))

Submission status: Accepted

Solution code:
import collections

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

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

Submission status: Accepted

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

dic={}
for i in ilist:
  dic[i]=1

print (len(dic))

Submission status: Accepted

Solution code:
#2020-04-29
num = int(input())
lst = []
for i in range(num):
    lst.append(input())
print(len(set(lst)))

Submission status: Accepted

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

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

ans = len(set(str))

print(ans)

Submission status: Accepted

Solution code:
from collections import defaultdict
d = defaultdict(int)
n = int(input())
i = 0
while i < n:
    s = input()
    d[s] += 1
    i += 1
print(len(d))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(len(s))

Submission status: Accepted

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

while(n>0):
    n-=1
    str=input()

    dict[str]=1

print(len(dict))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = input()
print(len(set(input() for num in range(int(n)))))

Submission status: Accepted

Solution code:
n = input()
gift = set()

for num in range(int(n)):
    gift.add(input())

print(len(gift))

Submission status: Accepted

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

print(len(Set))

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

all_S = set()

for i in range(N):
    all_S.add(str(input()))

print(len(all_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:
# coding: utf-8


def main():
    N = int(input())
    S = [None] * N
    for i in range(N):
        S[i] = input()
    
    S = sorted(S)

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


print(main())

Submission status: Accepted

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

print(len(set(b)))

Submission status: Accepted

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

Submission status: Accepted

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

print(len(s))

Submission status: Accepted

Solution code:
lotteries = []
num_of_lot = 0
num = int(input())

for i in range(num):
    lotteries.append(input())

num_of_lot = len(set(lotteries))
print(num_of_lot)

Submission status: Accepted

Solution code:
N = int(input())
str_list = sorted(list(input() for _ in range(N)))
str_set = list(set(str_list))
l = len(str_set)
print(l)

Submission status: Accepted

Solution code:
loopCnt = int(input())

strList = []
for i in range(loopCnt):
    inputStr = input()
    strList.append(inputStr)

setList = set(strList)

print(str(len(setList)))

Submission status: Accepted

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

Submission status: Accepted

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

#     item = str(input())
#     if item_list.count(item) == 0:
#         item_list.append(item)
#
# print(len(item_list))

item_set = (set(item_list))
print(len(item_set))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
s=[list(input().split()) for _ in range(N)]
s.sort()
ct=1

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

print(ct)

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:
#!/usr/bin/env python3

import sys
# import math
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product                # product(iter, repeat=n)
# from itertools import accumulate             # accumulate(iter[, f])
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from copy import deepcopy                    # to copy multi-dimentional matrix without reference
# from fractions import gcd                    # for Python 3.4


def main():
    mod = 1000000007                  # 10^9+7
    inf = float('inf')
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input(): return sys.stdin.readline().rstrip()
    def ii():  return int(input())
    def mi():  return map(int, input().split())
    def mi_0(): return map(lambda x: int(x)-1, input().split())
    def lmi(): return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():  return list(input())
    
    
    n = ii()
    L = list(set([input() for _ in range(n)]))
    print(len(L))

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print(len(set([input() for q in range(int(input()))])))

Submission status: Accepted

Solution code:
import sys
import math

lines = sys.stdin.readlines()
N = int(lines[0])
X = []

for i in range(N):
  Si = str(lines[i+1].split('\n')[0])
  X.append(Si)

X.sort()

z = 1
for i in range(N-1):
  if X[i] != X[i+1]:
    z +=1
print(z)

Submission status: Accepted

Solution code:
import sys
fruits = set()
for i, line in enumerate(sys.stdin):
    if i != 0:
        fruits.add(line)

print(len(fruits))

Submission status: Accepted

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

cnt = {}
for Si in S:
    cnt.setdefault(Si, 0)
    cnt[Si] += 1

print(len(cnt.keys()))