Problem:


Score : 300 points

Problem Statement

You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.

How many kinds of items did you get?

Constraints

1 \leq N \leq 2\times 10^5

S_i consists of lowercase English letters and has a length between 1 and 10 (inclusive).

Input

Input is given from Standard Input in the following format:

N
S_1
:
S_N

Output

Print the number of kinds of items you got.

Sample Input 1

3
apple
orange
apple

Sample Output 1

2

You got two kinds of items: apple and orange.

Sample Input 2

5
grape
grape
grape
grape
grape

Sample Output 2

1

Sample Input 3

4
aaaa
a
aaa
aa

Sample Output 3

4



Sample input:
3
apple
orange
apple


Sample output:
2

Submission status: Accepted

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

print(len(set(S)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
s = {}
for i in range(N):
    item = input()
    if item not in s:
        s[item] = 1
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:
n=int(input())
c=set()
for i in range(n):
    s=input()
    c.add(s)
print(len(c))

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
N = int(input().rstrip())
lis = {}
for _ in range(N):
  a = input().rstrip()
  if a in lis:
    lis[a] += 1
  else:
    lis[a] = 1
print(len(lis))

Submission status: Accepted

Solution code:
n=int(input())
s=set()
for i in range(n):
  st=input() 
  s.add(st)
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(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 = {}
for i in range(N):
    S.update([(input(), 1)])
s = S.keys()
print(len(s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
s = set()
for _ in range(N):
    S = input()
    if S in s:
        continue
    else:
        s.add(S)
print(len(s))

Submission status: Accepted

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

ans = len(set(A))

print(ans)

Submission status: Accepted

Solution code:
print(len(set(open(0).read().split("\n")))-2)

Submission status: Accepted

Solution code:
#! /usr/bin/env python3
import sys
sys.setrecursionlimit(10**9)


INF=10**20
class Counter:
    def __init__(self):
        self.dict = {}

    def add(self,x):
        if x in self.dict: self.dict[x] += 1
        else: self.dict[x] = 1

    def decrement(self,x):
        self.dict[x] -= 1
        if self.dict[x] <= 0:
            del self.dict[x]

    def get_dict(self):
        return self.dict



def solve(N: int, S: "List[str]"):
    counter = Counter()
    for s in S:
        counter.add(s)
    
    print(len(counter.get_dict().keys()))
        
    return

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



if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding = SJIS

ans = set()

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

print(len(ans))

Submission status: Accepted

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

sets = set(list)
ans = len(sets)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

A_list = list()

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

ans = len(set(A_list))
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
d = {}
for n in range(N):
    s = input()
    d[s] = True
print(len(d))

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    n = int(input())
    keihin_set = set()
    for i in range(n):
        s = input()
        if not s in keihin_set:
            keihin_set.add(s)
    print(len(keihin_set))
if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    S = [input() for _ in range(N)]
    dict = {}
    ans = 0
    for i in range(N):
        if S[i] in dict:
            continue
        else:
            dict[S[i]] = 1
            ans += 1

    return ans

print(main())

Submission status: Accepted

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

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

print(len(S))

Submission status: Accepted

Solution code:
from collections import Counter

N = int(input())

S_list = []

for i in range(N):
    str = input()
    S_list.append(str)

print(len(list(Counter(S_list))))

Submission status: Accepted

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

Submission status: Accepted

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

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

print(len(dict.keys()))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
GACHA={}
for n in range(N):
  g=input()
  GACHA[g]=GACHA.get(g,0)
print(len(GACHA))

Submission status: Accepted

Solution code:
def Cfun():
    lines = int(input())
    inputLst = []
    for i in range(lines):
        inputLst.append(input())
    itemSets = set(inputLst)
    print(len(itemSets))


Cfun()

Submission status: Accepted

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

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

print(len(set(s)))

Submission status: Accepted

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

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

Submission status: Accepted

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

li.sort()
last=li[0]

for i in range(1,n):
    if last==li[i]:
        li[i]=0
    
    else:
        last=li[i]

print(n-li.count(0))

Submission status: Accepted

Solution code:
num_freebies = int(input())

freebies = []

for _ in range(num_freebies):
    freebies.append(input())

print(len(set(freebies)))

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]
#a = [input() for _ in range(n)]

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

print(len(set(s)))

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
ins = lambda: input().rstrip()
ini = lambda: int(input().rstrip())
inm = lambda: map(int, input().split())
inl = lambda: list(map(int, input().split()))

seen = set()
t = ini()
for _ in range(t):
    s = ins()
    seen.add(s)
print(len(seen))

Submission status: Accepted

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

s_set = set(s_array)
print(len(s_set))

Submission status: Accepted

Solution code:
N=int(input())
S={0}
#A,B,C,D=map(int,input().split())

for i in range(N):
	S.add(input())
print(len(S)-1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

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()
for i in range(n):
  s.add(input())
  
print(len(list(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())
d = {}
ans = 0
for i in range(n):
  s = input()
  if d.get(s, 0)==0:
    d[s]=1
    ans+=1
print(ans)

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc164/tasks/abc164_c


N = int(input())

S_set = set()

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

ans = len(S_set)

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:
def solve():
    N = int(input())
    items = set([])
    for i in range(N):
        S = input()
        items.add(S)
    print(len(items))

if __name__ == "__main__":
    solve()

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

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 ,*S = open(0).read().split()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

if __name__ == "__main__":
    N=input()
    N=int(N)
    l=[]
    for i in range(N):
        buf=input()
        l+=[buf]
    l=np.array(l)
    print(len(np.unique(l)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
nn = int(input())
ss = [str(input()) for l in range(nn)]
ss.sort()

keihin = 1
for i in range(nn-1):
    if ss[i] != ss[i+1]:
        keihin += 1

print(keihin)

Submission status: Accepted

Solution code:
from collections import Counter

n = int(input())
s = [input() for _ in range(n)]
data = Counter(s)
print(len(data.keys()))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = [input() for _ in range(n)]
keihin_dict = {}
s = list(set(s))
print(len(s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


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


def main():
    n = int(input())
    items = {input() for _ in range(n)}
    print(len(items))


if __name__ == "__main__":
    main()

Submission status: Accepted

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


def main():
    n = int(input())
    items = {input() for _ in range(n)}
    print(len(items))


if __name__ == "__main__":
    main()

Submission status: Accepted

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


def main():
    n = int(input())
    items = {input().rstrip() for _ in range(n)}
    print(len(items))


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
n = int(input())
s=set()
for i in range(n):
  s.add(input())
print(len(s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

keihin = dict()

for i in range(n):
    s = input()
    if s in keihin:
        keihin[s] += 1
    else:
        keihin[s] = 1
print(len(keihin))

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:
#!/usr/bin/env python3
def main():
    N = int(input())

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

print(len(set(S)))

Submission status: Accepted

Solution code:
N = int(input())
S = [input() for i in range(N)]
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:
import collections

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

c = collections.Counter(S)

print(len(c.keys()))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    n = int(input())
    s = [input() for _ in range(n)]
    s = set(s)
    r = len(s)
    print(r)


if __name__ == '__main__':
    main()

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())
s.sort()
ans=n
for i in range(n-1):
    if s[i]==s[i+1]:
        ans-=1
print(ans)

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())
d={}
for _ in range(N):
  d[input()]=1
print(len(d))

Submission status: Accepted

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

for i in s:
    ans.add(i)

print(len(ans))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

a = [input()for i in range(N)]
c = collections.Counter(a)
print(len(c.keys()))

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

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

S=[]
for i in range(n):
    S.append(input())
    
S.sort()
c=1
for i in range(n-1):
    if S[i]!=S[i+1] :
        c+=1
print( c )

Submission status: Accepted

Solution code:
scnum = int(input())
word = [0]*scnum
for i in range(scnum):
    word[i] = input()
word.sort()
answer = 1

for j in range(scnum-1):
    if word[j] != word[j+1]:
        answer += 1
print(answer)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print(len({*open(0)}) - 1)

Submission status: Accepted

Solution code:
print(len(set(open(0))) - 1)

Submission status: Accepted

Solution code:
print(len(set(open(0).read().split())) - 1)

Submission status: Accepted

Solution code:
def readinput():
    n=int(input())
    sList=[]
    for _ in range(n):
        sList.append(input())
    return n,sList

def main(n,sList):
    keihin={}
    for s in sList:
        if s in keihin:
            keihin[s]+=1
        else:
            keihin[s]=1
    return len(keihin)

if __name__=='__main__':
    n,sList=readinput()
    ans=main(n,sList)
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(A)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections
N = int(input())
S = []
for i in range(N):
    s = input()
    S.append(s)
c = collections.Counter(S)
values, counts = zip(*c.most_common())
print(len(values))

Submission status: Accepted

Solution code:
N = int(input())

s = {}

for _ in range(N):
    tmp = input()
    s[tmp] = 1

print(len(s.keys()))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
M_Dict = {}
for i in range(N):
    Current_M = str(input())
    if Current_M in M_Dict:
        M_Dict[Current_M] += 1
    else:
        M_Dict[Current_M] = 1
        

print(len(M_Dict))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    A = {input() for i in range(N)}
    print(len(A))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())

s = set()

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

Submission status: Accepted

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

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

print(len(k))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#! python3
# coding:utf-8
import collections
 
def main():
    n = int(input())
    slist = [input() for _ in range(n)]
    c = collections.Counter(slist)
    print(len(c))

if __name__ == "__main__":
    main()

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

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

Submission status: Accepted

Solution code:
n = int(input())

lst = set()
for _ in range(n):
  j = input()
  if j not in lst:
    lst.add(j)
print(len(lst))

Submission status: Accepted

Solution code:
n = int(input())

ans = set([])
for _ in range(n):
    ans.add(input())

print(len(ans))

Submission status: Accepted

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

print(len(s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

ans = set()

for i in range(N):
    S = input()
    if S in ans:
        continue
    else:
        ans.add(S)

print(len(ans))

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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


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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    N = int(input())
    hash = {}
    for i in range(N):
        hash[input()] = ""
    print(len(hash.keys()))

Submission status: Accepted

Solution code:
import sys, bisect, math, itertools, string, queue, copy
import numpy as np
import scipy
from collections import Counter,defaultdict,deque
from itertools import permutations, combinations
from heapq import heappop, heappush
from fractions import gcd
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

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

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

print(ans)

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

T = [input() for i in range(N)]
T.sort()
c = 1
pre = T[0]
for i in range(1,N):
    if T[i] == pre:
        pass
    else:
        c += 1
    pre = T[i]
print(c)

Submission status: Accepted

Solution code:
import sys, itertools
print(len(set(itertools.islice(sys.stdin.buffer, 1, None))))

Submission status: Accepted

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

ans = len(set(S))

print(ans)

Submission status: Accepted

Solution code:
import sys
import itertools


def resolve(in_):
    return len(set(s.strip() for s in itertools.islice(in_, 1, None)))
    

def main():
    answer = resolve(sys.stdin.buffer)
    print(answer)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

l = sorted(a)

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

Submission status: Accepted

Solution code:
def gacha():
    # 入力
    N = int(input())
    S = [input() for _ in range(N)]
    # 重複排除
    freebie_tuple = set(S)
    # 景品の種類
    return len(freebie_tuple)

result = gacha()
print(result)

Submission status: Accepted

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

def main():

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

    setS = set()

    for i in S:
        setS.add(i)

    ans = len(setS)

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict
from collections import deque
from collections import OrderedDict
import itertools
from sys import stdin
input = stdin.readline


def main():
  N = int(input())
  set_ = set()
  for i in range(N):
    set_.add(input()[:-1])

  print(len(set_))

if(__name__ == '__main__'):
  main()

Submission status: Accepted

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