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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8


def solve(*args: str) -> str:
    n = int(args[0])
    S = set(args[1:])

    return str(len(S))


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))

Submission status: Accepted

Solution code:
n = int(input())

l = {}

for _ in range(n):
  s = input()
  l[s] = l.get(s, 0)

print(len(l))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

main()

Submission status: Accepted

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

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 _ in range(n)}
print(len(s))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

import sys
# sys.setrecursionlimit(10**6)
input = sys.stdin.buffer.readline
# arr = [[int(el) for el in input().split()] for i in range(n)]

n = int(input())

s = set()

for _ in range(n):

    st = input()

    s.add(st)

print (len(s))

Submission status: Accepted

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

Submission status: Accepted

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

for _ in range(N):
    keihin.append(input())

print(len(set(keihin)))

Submission status: Accepted

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

print(len(set(arr)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from math import sqrt
from collections import Counter, defaultdict, deque

input = sys.stdin.readline
sys.setrecursionlimit(10 ** 6)


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


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


def LI():
    return list(MI())


def LIN(n: int):
    return [I() for _ in range(n)]


inf = float("inf")
mod = 10 ** 9 + 7


def main():
    n = I()
    sl = [input().rstrip() for _ in range(n)]

    print(len(set(sl)))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys

def main():
    input=sys.stdin.readline
    N=int(input())

    d = {}
    cnt=0

    for i in range(N):
        key=input()
        if key not in d:
            cnt+=1
            d[key] = 0

    print(cnt)

if __name__ =='__main__': 
    main()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

items = []

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

print(len(set(items)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()

def main():
  N = int(input())

  a = set([])
  for i in range(N):
    a.add(input())
  print(len(a))

if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
n = int(input())

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

set = set(list)

print(len(set))

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=[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,*s = open(0).read().split()
print(len(set(s)))

Submission status: Accepted

Solution code:
import numpy as np
num = int(input())

str_list =[]
for _ in range(num):
  str_list.append(input())
  
print(len(np.unique(str_list)))

Submission status: Accepted

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

Submission status: Accepted

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

a.sort()
cnt = 1
for i in range(1, n):
  if a[i-1] != a[i]:
    cnt += 1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

def main():
# 整数の入力
    n = int(input())
    l = []
    for i in range(n):
        l.append(input())
    
    # 出力
    print(len(list(set(l))))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from collections import Counter

n = int(input())

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

c = list(Counter(tmp).values())

print(len(c))

Submission status: Accepted

Solution code:
import collections

N = int(input())
Sn = [input().rstrip() for _ in range(N)] 
c = collections.Counter(Sn)
ans = 0
for cc in c:
  ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

d = {}

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

cnt = 0

for key, value in d.items():
    cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
# ABC164 C

def main():
    n = int(input())
    S = []

    for _ in range(n):
        s = input()
        S.append(s)
    
    print(len(set(S)))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

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

print(len(set(a)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

print(len(set(slist)))

Submission status: Accepted

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

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

Submission status: Accepted

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

print(len(dict_lotte.keys()))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import decimal
input=sys.stdin.readline
n=int(input())
se=set()
ans=0
for i in range(n):
    s=input()
    if s not in se:
        ans+=1
        se.add(s)
print(ans)

Submission status: Accepted

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

print(len(set(S)))

Submission status: Accepted

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

print(len(list(set(line))))

Submission status: Accepted

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

print(len(d))

Submission status: Accepted

Solution code:
n = int(input())

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

print(len(set(s)))

Submission status: Accepted

Solution code:
from collections import Counter

N = int(input())
S = Counter([input() for _ in range(N)])
print(len(S.keys()))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
d = {}
for i in range(n):
	inp = input()
	d[inp] = 1
print(len(d.keys()))

Submission status: Accepted

Solution code:
import math, sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from copy import deepcopy
from functools import lru_cache
from heapq import heapify, heappop, heappush
from itertools import accumulate, combinations, permutations
input = sys.stdin.readline
mod = 10**9 + 7
ns = lambda: input().strip()
ni = lambda: int(input().strip())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

def main():
    n = ni()
    s = (ns() for _ in range(n))

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

ma = lambda : map(int,input().split())
ni = lambda : int(input())
import collections
co = collections.Counter()
n= ni()
for i in range(n):
    s = input()
    co[s] +=1
ans = 0
for i,w in co.items():
    ans +=1
print(ans)

Submission status: Accepted

Solution code:
import collections

N = int(input())
memory = []
counter = 0

for i in range(N):
    tmp = input()
    memory.append(tmp)

c = collections.Counter(memory)

print(len(c))

Submission status: Accepted

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

print(sum(gacha.values()))

Submission status: Accepted

Solution code:
import collections

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

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

Submission status: Accepted

Solution code:
def main():
	s = int(input())
	l = [str(input()) for i in range(s)]
	print(len(set(l)))

	

if __name__ == '__main__':
	main()

Submission status: Accepted

Solution code:
N = int(input())

list1 = set([])
for i in range(N):
    list1.add(input())
print(len(list1))

Submission status: Accepted

Solution code:
n = int(input())
d = {}
c=0
for i in range(n):
    a = input()
    try:
        d[a]+=1
    except KeyError:
        c+=1
        d[a]=1
print(c)

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

dic = {}
for i in range(n):
    dic[s[i]] = 0

print(len(dic.keys()))

Submission status: Accepted

Solution code:
# C - gacha

n = int(input())
s = set(input() for i in range(n))
print(len(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())
d = {}
ans = 0
for i in range(N):
    S = input()
    if S in d:
        continue
    d[S] = 1
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
goods = set()
ans = 0
for _ in range(N):
    good = input()
    if good not in goods:
        goods.add(good)
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
N = int(input())

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

print(len(prise))

Submission status: Accepted

Solution code:
from collections import defaultdict
n = int(input())
dic = defaultdict(int)
for _ in range(n):
  x = input()
  dic[x] += 1
print(len(dic))

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(N):
  S = input()
  arr.append(S)
    
arr.sort()
cnt = 1
for i in range(N-1):
  a = arr[i]
  b = arr[i+1]
  if a != b:
    cnt += 1

print(int(cnt))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

N = int(input())
K = []
for i in range(N):
    S = input()
    K.append(S)
    i = i + 1
    
A = collections.Counter(K)

print(len(A))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#A,B,C=(int(x) for x in input().split())
N=int(input())
#A=list(map(int, input().split()))

l=[]
for k in range(N):
    s=input()
    l.append(s)

print(len(set(l)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 9)
input = sys.stdin.readline
from itertools import permutations,  combinations, accumulate
from functools import *
from collections import deque, defaultdict, Counter
from heapq import heapify, heappop, heappush, heappushpop

INF = float('inf')
NIL = - 1

""" Input
S = input().rstrip()
N, A, B = map(int, input().split())
A = list(map(int, input().split()))
A = np.array(input().split(), dtype=np.float64)
D = [int(input()) for _ in range(N)]
AB = [[int(x) for x in input().split()] for _ in range(N)]
PX = [[int(x) for x in input().split()] for _ in range(Q)]
"""

N = int(input())
keihin = [input().rstrip() for _ in range(N)]

counter = Counter(keihin)
print(len(counter))

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

kv = {}

for i in range(N):
	s = input()
	if s in kv.keys():
		kv[s] = kv[s] + 1
	else:
		kv[s] = 1

print(len(kv.keys()))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

solution()

Submission status: Accepted

Solution code:
from collections import defaultdict, deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys
import random
import itertools
import math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt


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


def LF(): return list(map(float, input().split()))


def LI_(): return list(map(lambda x: int(x)-1, input().split()))


def II(): return int(input())


def IF(): return float(input())


def LS(): return list(map(str, input().split()))


def S(): return list(input().rstrip())


def IR(n): return [II() for _ in range(n)]


def LIR(n): return [LI() for _ in range(n)]


def FR(n): return [IF() for _ in range(n)]


def LFR(n): return [LI() for _ in range(n)]


def LIR_(n): return [LI_() for _ in range(n)]


def SR(n): return [S() for _ in range(n)]


def LSR(n): return [LS() for _ in range(n)]


def gcd(x, y):
    if y == 0:
        return x
    return gcd(y, x % y)


def my_index_multi(l, x):
    return [i for i, _x in enumerate(l) if _x == x]


def sosu(x):
    for i in range(2, int(sqrt(x)+1)):
        if x % i == 0:
            return False
    return True


mod = 1000000007
inf = float('INF')


def A():
    S, W = LI()
    if S>W:
        print('safe')
    else:
        print('unsafe')

    
    return

# B


def B():
    A,B,C,D=LI()
    while(1):
        C=C-B
        if C<=0:
            print('Yes')
            break
        A=A-D
        if A<=0:
            print('No')
            break



    return

# C


def C():
    N=II()
    S=['i']*N
    for i in range(N):
        S[i]=input().rstrip()
    print(len(set(S)))

    return


def D():
    N,K=LI()
    P=LI()
    tmp=sum(P[:K])
    s=0
    pp=sorted(P, reverse=True)
    tmpmax=sum(pp[:K])
    for i in range(K,N+1):
        if (P[i-1]>P[s-1] and s!=0):
            tmp2=sum(P[s:i])
            if (tmp2==tmpmax):
                tmp=tmp2
                break
            tmp=max(tmp,tmp2)
        s+=1
        

    print((tmp+K)/2)
    return

# E


def E():
    N, K = LI()
    A = LI()
    F = LI()
    A.sort(reverse=True)
    F.sort()
    cost = []
    for i in range(len(N)):
        cost.append(A[i]*F[i])

    a = F[cost.index(max(cost))]

    return

# F


def F():
    N, M = LI()

    value = [0] * M
    power = [0] * M
    for i in range(M):
        a, b = LI()
        value[i] = a
        c = LI()
        L = ['0'] * N
        for k in c:
            L[k - 1] = '1'
        bint = ''.join(L)
        power[i] = int(bint, 2)
    bint = ''.join(list(['1'] * N))
    dp = [inf] * (int(bint, 2)+1)
    t = 0
    cost = 0

    dp[0] = 0
    for s in range(int(bint, 2) + 1):
        for i in range(M):
            t = s | power[i]
            cost = dp[s] + value[i]
            dp[t] = min(dp[t], cost)
    print(-1) if(dp[-1] == inf) else print(dp[-1])

    return

    # you can write to stdout for debugging purposes, e.g.
# print("this is a debug message")


def solution(S):
    # write your code in Python 3.6
    N = len(S)

    pass


# Solve
if __name__ == '__main__':

    C()

Submission status: Accepted

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

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

print(len(item))

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(N):
    a.add(input())


print(len(a))

Submission status: Accepted

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

S = list(set(S))

print(len(S))

Submission status: Accepted

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

n = int(input())
ans = set()
for i in range(n):
    ans.add(input().strip())

print(len(ans))

Submission status: Accepted

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

print(len(s))

Submission status: Accepted

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

print(len(S))

Submission status: Accepted

Solution code:
from sys import stdin

def main():
    input = stdin.readline
    n = int(input())
    l = []
    for i in range(n):
        s = input()
        l.append(s)

    print(len(set(l)))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
present = {}
for i in range(N):
    S = input()
    if S not in present:
        present[S] = True

print(len(present))

Submission status: Accepted

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

Submission status: Accepted

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

S2 = list(set(S1))
print(len(S2))

Submission status: Accepted

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

N = int(input().strip())
S_list = [input().strip() for _ in range(N)]
#-----

check = set()

for word in S_list:
    check.add(word)

print(len(check))

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())
ai = [0 for i in range(N)]
for j in range(N):
    ai[j] = str(input())
s_ai = set(ai)
print(len(s_ai))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

a = {}
for _ in range(0, n):
    s = input()
    if s not in a:
        a[s] = 1
    else:
        a[s] += 1

print(len(a))

Submission status: Accepted

Solution code:
N = int(input())

dict = set()

for i in range(N):
    dict.add(input())

print(len(dict))

Submission status: Accepted

Solution code:
a=int(input())
list1=[]
for i in range(a):
  list1.append(input())
a=set(list1)
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:
N=int(input())
S=[input() for i in range(N)]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())


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

print(len(set(S)))

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

dic = {}
N=int(input())
for x in range(N):
    S=str(input())
    dic[S]=1
print(len(dic.keys()))

Submission status: Accepted

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

Submission status: Accepted

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

def resolve():
    N = int(input())
    S = tuple(input() for _ in range(N))

    print(len(set(S)))

if __name__ == '__main__':
    resolve()

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

Submission status: Accepted

Solution code:

N = int(input())
Dict = {}
for Num in range(N):
    key = input()
    Dict[key] = 0

print(len(Dict))

Submission status: Accepted

Solution code:
import sys
import math

from collections import defaultdict
from collections import deque
def load(vtype=int):
    return vtype(input().strip())

d = set()
n  = load()
l = []
for _ in range(n):
    d.add(load(str))
print(len(d))

Submission status: Accepted

Solution code:
N=int(input())

S={}

for i in range(N):
    a=input()
    if a in S:
        pass
    else:
        S[a] = 0

print(len(S))

Submission status: Accepted

Solution code:
N=int(input())

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

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

Submission status: Accepted

Solution code:
def mapint_inp():
    return map(int, input().split())

def intinp():
    return int(input())

N = intinp()
item_set = set()
ans = 0

for _ in range(N):
    S = input()
    if S in item_set: continue
    item_set.add(S)
    ans += 1

print(ans)

Submission status: Accepted

Solution code:
# C - gacha

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
from io import StringIO
import unittest

def resolve():

    n = int(input())

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

    print(len(dict.items()))



class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """3
apple
orange
apple"""
        output = """2"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """5
grape
grape
grape
grape
grape"""
        output = """1"""
        self.assertIO(input, output)
    def test_入力例_3(self):
        input = """4
aaaa
a
aaa
aa"""
        output = """4"""
        self.assertIO(input, output)

if __name__ == "__main__":
    # unittest.main()
    resolve()

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())
ls = set()
for i in range(N):
  Sn = str(input())
  ls.add(Sn)

print(len(ls))

Submission status: Accepted

Solution code:
n = int(input(''))

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

print(len(l))

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


def solve():
    n = int(input())

    gatcha_set = set()
    for _ in range(n):
        gatcha_set.add(input())
    return len(gatcha_set)


if __name__ == '__main__':
    answer = solve()
    print(answer)

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

S0=set(S)

print(len(S0))

Submission status: Accepted

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

res = {}
for s_i in s:
    if not s_i in res:
        res[s_i] = 0
    res[s_i] += 1
print(len(res.keys()))

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_list = set()
for i in range(N):
    a = input()
    a_list.add(a)

print(len(a_list))

Submission status: Accepted

Solution code:
n=int(input())
lst=[input() for i in range(n)]
s=list(set(lst))
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:
n = int(input())
group = set()

for i in range(n):
    group.add(input())
print(len(group))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

print(len(set(s_list)))

Submission status: Accepted

Solution code:
N = int(input())

items = set()

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

print(len(items))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import stdin
import math


if __name__ == "__main__":
    _in = [_.rstrip() for _ in stdin.readlines()]
    N = int(_in[0])  # type:int
    S_arr = []
    for i in range(N):
        S = _in[i+1]   # type:str
        S_arr.append(S)
    # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
    # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    print(len(set(S_arr)))

Submission status: Accepted

Solution code:
n = int(input())

item_set = set()
for _ in range(n):
    item_set.add(input())

print(len(item_set))

Submission status: Accepted

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



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())


st = set()
for _ in range(N):
    s = input()

    st.add(s)


print(len(st))

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

Submission status: Accepted

Solution code:
arr = {}
for _ in range(int(input())):
    s = input() 
    arr[s] = 1
c=0
for i in arr:
    c+=1
print(c)

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