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:
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate, product
import sys
import bisect
import string
import math
import time


def I(): return int(input())


def S(): return input()


def MI(): return map(int, input().split())


def MS(): return map(str, input().split())


def LI(): return [int(i) for i in input().split()]


def LI_(): return [int(i)-1 for i in input().split()]


def StoI(): return [ord(i)-97 for i in input()]


def ItoS(nn): return chr(nn+97)


def input(): return sys.stdin.readline().rstrip()


def debug(table, *args):
    ret = []
    for name, val in table.items():
        if val in args:
            ret.append('{}: {}'.format(name, val))
    print(' | '.join(ret), file=sys.stderr)


yn = {False: 'No', True: 'Yes'}
YN = {False: 'NO', True: 'YES'}
MOD = 10**9+7
inf = float('inf')
IINF = 10**10
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']

show_flg = False
# show_flg = True


def main():
    N = I()
    m = defaultdict(int)

    for i in range(N):
        m[S()] += 1

    print(len(m.keys()))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

    S_set = set(S_list)
    print(len(S_set))

if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
# sys.stdin.readline()
import sys
input = sys.stdin.readline

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=set()
c=0
n=int(input())
for i in range(0,n):
  s=input()
  if s in x:
    pass
  else:
    x.add(s)
    c+=1
print(c)

Submission status: Accepted

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

Submission status: Accepted

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

N = int(input())
S = set()

for _ in range(N):
    test = input()
    if test not in S:
        S.add(test)

print(len(S))

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

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

print(len(Counter(s)))

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
data = set()
count = 0
for _ in range(N):
    line = input()
    if not line in data:
        data.add(line)
        count += 1

print(count)

Submission status: Accepted

Solution code:
import sys
from pprint import pprint

N = int(sys.stdin.readline().strip())
items = set()
for _ in range(N):
    items.add(sys.stdin.readline().strip())

print(len(items))

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline
N = int(input())
S = [input() for _ in range(N)]

print(len(set(S)))

Submission status: Accepted

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

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:
# C - gacha
from collections import Counter

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

c = Counter(s)

print(len(c))

Submission status: Accepted

Solution code:
n = int(input()) # 入力が1つ
# map(int, input().split()) # 入力が複数
# [int(i) for i in input().split()] # 配列で数字
kinds = set()
for i in range(n):
    kinds.add(input())

ans = len(kinds)
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
ans = 0
dict = {}
for i in range(N):
    a = input()
    if a not in dict:
        dict[a] = 1
        ans += 1
    else:
        pass
print(ans)

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:
from collections import Counter
N = int(input())
List = [input() for _ in range(N)]
Con = Counter(List)
print(len(Con))

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:
import sys
from random import choice,randint
inp=sys.stdin.readline
out=sys.stdout.write
flsh=sys.stdout.flush
 
sys.setrecursionlimit(10**9)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]
 
def MI(): return map(int, inp().strip().split())
def LI(): return list(map(int, inp().strip().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines().strip()]
def LI_(): return [int(x)-1 for x in inp().strip().split()]
def LF(): return [float(x) for x in inp().strip().split()]
def LS(): return inp().strip().split()
def I(): return int(inp().strip())
def F(): return float(inp().strip())
def S(): return inp().strip()
def pf(s): return out(s+'\n')
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)

def main():
    from collections import Counter
    n=I()
    l = []
    for i in range(n):
        s = S()
        l.append(s)
    z = Counter(l)
    print(len(z))

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    n, *s = open(0).read().split()
    t = set(s)
    ans = len(t)
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
a = set()
for i in range(N):
	a |= {str(input())}
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:
n = int(input())
s = []

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

Submission status: Accepted

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

print(len(set(kuzi)))

Submission status: Accepted

Solution code:
N = int(input())
lst = [input() for _ in range(N)]
s = set()
for prize in lst:
    if prize not in s:
        s.add(prize)
print(len(s))

Submission status: Accepted

Solution code:
import sys
n = int(sys.stdin.readline())
li = []
for _ in range(n):
  li.append(sys.stdin.readline().strip())
li2 = list(set(li))
print(len(li2))

Submission status: Accepted

Solution code:
from collections import defaultdict
N = int(input())

d = defaultdict(int)
for i in range(N):
    key = input()
    d[key] += 1
ans = 0
for key, value in d.items():
    ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(lst)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict

n = int(input())
cnt = defaultdict(int)
for i in range(n):
    s = input()
    cnt[s] += 1

print(len(cnt))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

c = Counter(array)
print(len(c))

Submission status: Accepted

Solution code:
def Main(N, S):
    d = {}
    for s in S:
        if s not in d:
            d[s] = 0
        else:
            d[s] += 1
    return len(d)
    
def main():
    N = int(input())
    S = []
    for i in range(N):
        S.append(str(input()))
    print(Main(N, S))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

while True:
    try:
        s.append(input())
    except:
        break
print(len(set(s)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())						# 5


from collections import defaultdict
d = defaultdict(int)

for _ in range(N):
	s = input()		# 文字列の入力  abcdefg...
	d[s] = 1

print( len(d) )

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
def main():
    N = int(input())
    S = [input() for i in range(N)]
    SET = set(S)
    print(len(SET))
    

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

keihin = set([])

for s in range(N):
    keihin.add(input())
    
print(len(keihin))

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:
def input_one_number():
    return int(input())

def input_multiple_number():
    return map(int, input().split())

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


N = input_one_number()

listS = []
import hashlib
for i in range(N):
	listS.append(input())

print(len(set(listS)))

Submission status: Accepted

Solution code:
n = int(input())

dic = {}

for i in range(n):
    a = str(input())
    if dic.get(a) is None:
        dic[a] = 1
    else:
        dic[a] +=1
    
    
keys = list(dic.keys())
ans = int(len(keys))

print(ans)

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())

prise = set()

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

print(len(prise))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter

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

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

Submission status: Accepted

Solution code:
def C():
    N = int(input())
    kinds = set()
    for i in range(N):
        S = input()
        kinds.add(S)
    
    print(len(kinds))
C()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

print(len(set(S)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

print(len(t))

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

N = int(input())

dic = {}
for i in range(N):
    S = input()
    if S not in dic:
        dic[S] = 1

print(len(dic.keys()))

Submission status: Accepted

Solution code:
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))


N = INT()
prize = set()

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

print(len(prize))

Submission status: Accepted

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


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# A,B,C,D=map(int,input().split())
N=int(input())
w=set()
for i in range(N):
    w.add(input())
print(len(w))

Submission status: Accepted

Solution code:
import sys,math,copy,queue,itertools,bisect,collections
sys.setrecursionlimit(10**7)
LI = lambda : [int(x) for x in sys.stdin.readline().split()]
_LI = lambda : [int(x)-1 for x in sys.stdin.readline().split()]
NI = lambda : int(sys.stdin.readline())
INF = 10**18
MOD = 10**9 + 7
DD = ((1,0),(0,1),(-1,0),(0,-1))
n = NI()
s = [sys.stdin.readline().rstrip() for _ in range(n)]
s = set(s)
print (len(s))

Submission status: Accepted

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

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

n = int(input())

s = []
for i in range(n):
    s.append(input())
    
c = collections.Counter(s)

print(len(c))

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

str = list()
for _ in range(N):
    S = input()
    str.append(S)
str = list(set(str))
print(len(str))

Submission status: Accepted

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

print(len(jisyo))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


N = int(input())
output = [0]*N

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

print(len(set(A)))

Submission status: Accepted

Solution code:
N = int(input())
#l = [int(x) for x in input().split()]
from collections import defaultdict
d = defaultdict(int)
for i in range(N):
    s = input()
    d[s] += 1
print(len(d))

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

Submission status: Accepted

Solution code:
import sys
import math
from collections import Counter
import itertools
#from functools import reduce

# 入力を整数に変換して受け取る
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())
# 入力全てを整数に変換したものの配列を受け取る
def LI(): return list(map(int, sys.stdin.readline().split()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

# リストを改行区切りで出力する
p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")

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

N=II()
S={SR() for _ in range(N)}

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

Submission status: Accepted

Solution code:
n=input()
a=[]
for i in range(n):
	a+=[raw_input()]

print len(set(a))

Submission status: Accepted

Solution code:
import sys
import itertools
if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
a=int(input())

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

slist=set(list)

print(len(slist))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict

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

count = 0
d = defaultdict(int)

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

print(len(d))

Submission status: Accepted

Solution code:
from collections import Counter

def main():
    n = int(input())
    t = []
    for _ in range(n):
        t.append(input())
    c = Counter(t)
    print(len(c))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
import math
from collections import deque
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def S(): return sys.stdin.readline()
def LS(): return sys.stdin.readline().split()
def LS2(N): return [sys.stdin.readline().split() for i in range(N)]
def FILL(i,h,w): return [[i for j in range(w)] for k in range(h)]
def sisha(num,digit): return Decimal(str(num)).quantize(Decimal(digit),rounding=ROUND_HALF_UP)
#'0.01'や'1E1'などで指定、整数に戻すならintをかます
MOD = 1000000007
INF = float("inf")
sys.setrecursionlimit(10**6+10)


N = I()
l = [input() for i in range(N)]
d = {}
ans = 0
for item in l:
    if item in d:
        continue
    else:
        ans += 1
        d[item] = 1
        continue
print(ans)

Submission status: Accepted

Solution code:
# import sys
# sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
def II(): return int(input())

def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())

def LI(): return list(map(int, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]


def solve():
    n = II()

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

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

cnt = len(set(s))

print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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


print(len(s))

Submission status: Accepted

Solution code:
from functools import reduce
from fractions import gcd
import math
import bisect
import itertools
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float("inf")


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding:utf-8

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

Submission status: Accepted

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


if __name__ == '__main__':
    resolve()

Submission status: Accepted

Solution code:
n = int(input())

s = [input() for _ in range(n)]

print(len(set(s)))

Submission status: Accepted

Solution code:
# from math import factorial,sqrt,ceil,gcd
# from itertools import permutations as permus
# from collections import deque,Counter
# import re
# from functools import lru_cache # 簡単メモ化 @lru_cache(maxsize=1000)
# from decimal import Decimal, getcontext
# # getcontext().prec = 1000
# # eps = Decimal(10) ** (-100)

# import numpy as np
# import networkx as nx
# from scipy.sparse.csgraph import shortest_path, dijkstra, floyd_warshall, bellman_ford, johnson
# from scipy.sparse import csr_matrix
# from scipy.special import comb

# slist = "abcdefghijklmnopqrstuvwxyz"
N = int(input())
rows = [input() for _ in range(N)]

sets = set(rows)

print(len(sets))
# print(*ans)   # unpackして出力。間にスペースが入る
# for row in board:
#     print(*row,sep="")    #unpackして間にスペース入れずに出力する
# print("{:.10f}".format(ans))
# print("{:0=10d}".format(ans))

Submission status: Accepted

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

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

Submission status: Accepted

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

get.sort()
ans = 0
for i in range(N):
    if get[i] != get[i+1]:
        ans += 1
print(ans)

Submission status: Accepted

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

ans = set(s)

print(len(ans))

Submission status: Accepted

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

#print(set(L))
print(len(set(L)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
#from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
#from math import floor, ceil
#from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
#inf = 10**17
#mod = 10**9 + 7

n=I()
strs=[]
for i in range(n):
    strs.append(input().rstrip())
u=Counter(strs)
#print(u)
ans=n
for i in u.values():
    ans-=i-1
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

# process
ans = len(set(S))

# output
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

n = int(input())

d = set()

for _ in range(n):
    d.add(input())

print(len(d))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

print(len(set(word_list)))

Submission status: Accepted

Solution code:
from collections import defaultdict

n = int(input())
d = defaultdict(bool)
for i in range(n):
    d[input()] = True

print(len(d))

Submission status: Accepted

Solution code:
def main():
    from builtins import int, map, list, print, len
    import sys
    sys.setrecursionlimit(10 ** 6)

    input = sys.stdin.readline
    input_list = (lambda: input().rstrip().split())
    input_number = (lambda: int(input()))
    input_number_list = (lambda: list(map(int, input_list())))

    N = input_number()
    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={}
cnt=0

for i in range(n):
  a=str(input())
  if a in s:
    continue

  else:
    s[a]=1
    cnt+=1

print(cnt)

Submission status: Accepted

Solution code:
import collections

if __name__ == '__main__':
	 N = int(input())
	 ls = []
	 for _ in range(N):
	 	ls.append(input())
	 c = collections.Counter(ls)

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

Submission status: Accepted

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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from collections import defaultdict

N = int(input())
S_dic = defaultdict(int)

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

print(len(S_dic))

Submission status: Accepted

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

Submission status: Accepted

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

for prize in [input() for i in range(N)]:
    prizes.add(prize)

print(len(prizes))

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:
print(len({input().strip() for _ in range(int(input().strip()))}))

Submission status: Accepted

Solution code:
def q3():
    n = int(input())
    d = {}
    for i in range(n):
        name = input()
        d[name] = 0
    print(len(d.keys()))

q3()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)


def main():
    n = int(input())
    dic = {}
    for i in range(n):
        s = input()
        if s not in dic:
            dic[s] = 1
    print(len(dic))


main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = []

n = int(input())
for _ in range(n):
    k.append(input())

print(len(set(k)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections
n = int(input())

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

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

d = {}

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

print(len(d))

Submission status: Accepted

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

S=sorted(S)
count=1

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

print(count)

Submission status: Accepted

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