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:
anslist=set()

N=int(input())
for i in range(N):
    a=input() 
    if not(a in anslist):
        anslist.add(a)
print(len(anslist))

Submission status: Accepted

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

print(len(s))

Submission status: Accepted

Solution code:
def resolve():
    a=int(input())

    ans = list()
    for i in range(a):
        ans.append(input())
    
    ans_set = set(ans)
    print(len(ans_set))

resolve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter

N = int(input())
lis = []
for _ in range(N):
  lis.append(input())
  
c = Counter(lis)
print(len(c))

Submission status: Accepted

Solution code:
n = int(input())
gacha_list = [list(input().split()) for _ in range(n)]

gachacount = []
for gachas in gacha_list:
    for name in gachas:
        gachacount.append(name)

set_gacha = set(gachacount)
print(len(set_gacha))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())

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

print(len(s))

Submission status: Accepted

Solution code:
n = int(input())

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

print(len(d))

Submission status: Accepted

Solution code:
N = int(input())

s_dict = {}
for _ in range(N):
    s = input()

    if s not in s_dict:
        s_dict[s] = 1
    else:
        s_dict[s] += 1

print(len(s_dict))

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

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())
memo = {}

for _ in range(N):
    Si = input()
    memo[Si] = None

print(len(memo))

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(items)))

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

n = int(input())

l = [str(input()) for _ in range(n)]

print(len(set(l)))

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0

# set()は重複する要素が削除される
#print(set(S))
ans = len(set(S))
print(ans)

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

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

Submission status: Accepted

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

print(len(set(Slist)))

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

n = int(readline())
s = read().decode().rstrip().split()
s = set(s)
print(len(s))

Submission status: Accepted

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

Submission status: Accepted

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

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

print(len(s))

Submission status: Accepted

Solution code:
N = int(input())

dic = {}

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

print(len(dic))

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:
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())
S = [input() for _ in range(N)]
D = {}
for s in S:
    if s not in D:
        D.setdefault(s, 1)
    else:
        D[s] += 1
print(len(D))

Submission status: Accepted

Solution code:
num_of_kuji = int(input())
prizes = set()
for _ in range(num_of_kuji):
    prizes.add(input())

print(len(prizes))

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

a = []
for i in range(N):
  a.append(input())
 
b = set(a)

print(len(list(b)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

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

C = collections.Counter(S)

print(len(C))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = {}
ans = 0

n = int(input())
for _ in range(n):
    i = input()
    ans += a.get(i, 1)
    a[i] = 0

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#整数の入力
num = int(input())

#リスト宣言
l = []

for m in range(num):
    st = input()
    l.append(st)

#重複要素削除
print(len(set(l)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#import numpy as np
n = int(input())
S = list()
for i in range(1,n+1):
    S.append(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

keihin = {}
for i in range(N):
    name = input()
    keihin[name] = i

print(len(keihin.keys()))

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())
values = [input()]
values_dict = {}
for i in range(N-1):
    values.append(input())

for value in values:
	values_dict[value] = values_dict.get(value, 0) + 1

a = values_dict.keys()
print(len(a))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

l= []

for v in range(n):
    s = input()
    l.append(s)
l = set(l)
print(len(l))

Submission status: Accepted

Solution code:
n = int(input())

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

print(len(keihin))

Submission status: Accepted

Solution code:
n = int(input())

gacha = []

for i in range(n):
    item = input()
    gacha.append(item)

print(str(len(set(gacha))))

Submission status: Accepted

Solution code:
N = int(input())
S = set(str(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())

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

Submission status: Accepted

Solution code:
N = int(input())

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

d = {}
for item in items:
    d[item] = True
    
print(len(d))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline
readall = sys.stdin.read
ns = lambda: readline().rstrip()
ni = lambda: int(readline().rstrip())
nm = lambda: map(int, readline().split())
nl = lambda: list(map(int, readline().split()))
prl = lambda x: print(*x ,sep='\n')

n = ni()
ans = set()

for _ in range(n):
    s = ns()
    ans.add(s)

print(len(ans))

Submission status: Accepted

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

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())
d = {}
for i in range(1, N + 1):
  d[input()] = 1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

    prise = []

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

Submission status: Accepted

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

a=set(a)

print(len(a))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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 defaultdict

def main():
    n = int(input())
    d = defaultdict(int)
    count = 0
    for i in range(n):
        s = input()
        if d[s] == 0:
            count+=1
            d[s] += 1
        else:
            continue
    print(count)
    
if __name__ == "__main__":
    main()

Submission status: Accepted

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

for i in range(n):
    name = input()
    if(name in dic):
        dic[name] +=1
    else:
        dic[name] = 1


print(len(dic))

Submission status: Accepted

Solution code:
#import bisect,collections,copy,heapq,itertools,math,numpy,string
#from operator import itemgetter
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
N = I()
S = [S() for _ in range(N)]
dict = {}

for s in S:
	dict[s] = 1
print(len(dict))

Submission status: Accepted

Solution code:
#import bisect,collections,copy,heapq,itertools,math,numpy,string
#from operator import itemgetter
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
N = I()
S = [S() for _ in range(N)]
dict = {}

for s in S:
	if s not in dict:
		dict[s] = 1
print(len(dict))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
s=set()
for c 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()) 
S = [input() for i in range(N)]
print(len(set(S)))

Submission status: Accepted

Solution code:
n = int(input())
s = []
ans = n
for i in range(n):
    s.append(input())
s = sorted(s)
for i in range(1,n):
    if s[i] == s[i-1]:
        ans-=1
print(ans)

Submission status: Accepted

Solution code:
import sys


def main():
    readline = sys.stdin.readline
    N = int(readline())
    se = set([readline() for _ in range(N)])
    print(len(se))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())
S = [ str(input()) for _ in range(N)]
print(len(set(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:
N = int(input())
S = [input() for _ in range(N)]

d = {}

for word in S:
    if word in d:
        d[word] += 1
    else:
        d[word] = 1

print(len(d.keys()))

Submission status: Accepted

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

Submission status: Accepted

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

set_S = set(S)
list_set_S = list(set_S)
print(len(list_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(input())
li=[]
for si in range(n):
    si=input()
    li.append(si)
print(len(set(li)))

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc164/tasks/abc164_c
n = int(input())
dic = {}
for i in range(n):
    s = input()
    dic[s] = 0
print(len(dic))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

n = int(input())

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
N=int(input())
L=[]
for i in range(N):
    S=input()
    L.append(S)

sL=set(L)

print(len(sL))

Submission status: Accepted

Solution code:

n = int(input())
str = [input() for i in range(n)]
str.sort()
k = 1
for i in range(n-1):
    if(str[i] != str[i + 1]):
        k += 1




print(k)

Submission status: Accepted

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

Submission status: Accepted

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

ss = sorted(s)
test = ss[0]
count = 1

for i in range(n):
  if test != ss[i]:
    test = ss[i]
    count += 1
    
print(count)

Submission status: Accepted

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

print(len(set(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())
ans = {}
for i in range(N):
  t = input()
  if t not in ans:
    ans[t] = 1
print(len(ans.keys()))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

kind = {}
for i in range(N):
    S = input()

    if S not in kind:
        kind[S] = 1

print(len(kind))

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    n = int(input())
    items = set()
    for _ in range(n):
        items.add(input()[:-1])
    print(len(items))


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

Submission status: Accepted

Solution code:
n = int(input())
i = 0
s = set()
while i<n:
    s.add(str(input()))
    i+=1


print(len(s))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input().strip())
d = {}
for n in range(N):
    S = input()
    if S in d:
        d[S] += 1
    else:
        d[S] = 0
print(len(d))

Submission status: Accepted

Solution code:
from collections import defaultdict
counter=defaultdict(int)
N=int(input())
for i in range(N):
  k=input()
  counter[k]+=1
c=0
for s,t in counter.items():
  c+=1
print(c)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
#n = int(input())
#l = list(map(int, input().split()))
'''
A=[]
B=[]
for i in range():
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)'''

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

Submission status: Accepted

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

print(len(list(set(J))))

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

premiums = set()

for n in range(N):
    premiums.add(input())

print(len(premiums))

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

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()
from collections import Counter
def main():
    n=int(input())
    S=[input() for _ in range(n)] 
    sc=Counter(S)
    print(len(sc.items()))
if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

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

ans = list(set(gift))
print(len(ans))

Submission status: Accepted

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

# print(P)
ans = set()

for p in P:
    ans.add(p)

print(len(list(ans)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n  = int(input())

array = set()

for i in range(n):
    s = input()
    array.add(s)
    
print(len(array))

Submission status: Accepted

Solution code:
n = int(input())


st = set()

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


print(len(st))

Submission status: Accepted

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

s_unique = list(set(s))

print(len(s_unique))

Submission status: Accepted

Solution code:
import sys
import itertools
import numpy as np

read = sys.stdin.read #標準入力から複数行取得するための関数です。 readlines() が結果を行単位で分割してリストで返すのに対して、 read() は結果をそのまま1つの文字列として取得します。
readline = sys.stdin.readline #標準入力から1行取得するための関数です。
readlines = sys.stdin.readlines #標準入力から複数行取得するための関数です。戻り値はリストで、入力された文字列が1行ずつ要素として格納されています。
# .bufferはbytes を返すのでさらに少しだけ速いようですが、あまり差はありません。

N = int(readline())
S = set(read().split())

print(len(S))

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:
def solve(string):
    return str(len(set(string.split())) - 1)


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

n = I()
x = set()
for _ in range(n):
    x.add(input())
print(len(x))

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

product = set()
for n in range(N):
    product.add(input())

print(len(product))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

print(len(set(S_list)))

Submission status: Accepted

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


if __name__ == "__main__":
    main()

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

n = int(input())
s_list = []

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

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

Submission status: Accepted

Solution code:
n = int(input())

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

l = list(set(l))

ans = len(l)

print(ans)

Submission status: Accepted

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

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

S = set(S)

ans = len(S)

print(ans)

Submission status: Accepted

Solution code:
import sys
from collections import deque
import copy
def main():
    N = int(input())
    S = []
    for i in range(N):
        s = input()
        S.append(s)
    S.sort()
    count = N
    for i in range(1, len(S)):
        if S[i - 1] == S[i]:
            count -= 1
    print(count)
    

if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import collections

N = int(input())
S = list(input() for _ in range(N))

setS = set(S)

print(len(setS))

Submission status: Accepted

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

print(S)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

a={0}
for i in range(N):
    b=input()
    a.add(b)
    
print(len(a)-1)

Submission status: Accepted

Solution code:
N = int(input())
S = []
for i in range(N):
    s = input()
    S.append(s)
ans = len(S)
S.sort()
for i in range(1,N):
    if S[i] == S[i-1]:
        ans -= 1
print(ans)

Submission status: Accepted

Solution code:
import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
n = int(input())
ans = 0
c = defaultdict(lambda: 0)
for _ in range(n):
    s = input()
    if(s not in c):
        ans += 1
        c[s] += 1
print(ans)

Submission status: Accepted

Solution code:
n = int(input())

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

count_set = set()

for i in range(n):
    count_set.add(s[i])

print(len(count_set))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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