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=[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:
# -*- coding: utf-8 -*-
n = int(input())
s = []
for i in range(n):
    s.append(str(input()))

print(len(set(s)))

Submission status: Accepted

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

import sys
# 再起回数上限変更
# sys.setrecursionlimit(1000000)

from collections import Counter


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

print(len(list(Counter(S))))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

N = int(input())

Get = set()

for i in range(N):
    S = str(input())
    Get.add(S)
print(len(Get))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

d = {}
for _ in range(N):
    S = input()
    d.setdefault(S, 0)
    d[S] += 1
print(len(list(d.keys())))

Submission status: Accepted

Solution code:
n = int(input())

var = [""] * n

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

ort_var = set(var)

print(len(ort_var))

Submission status: Accepted

Solution code:
n = int(input())

gachas = set()

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

print(len(gachas))

Submission status: Accepted

Solution code:
from collections import Counter

N = int(input())
L = []
for i in range(N):
    L.append(input())
    
X = Counter(L)
print(len(X))

Submission status: Accepted

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

Submission status: Accepted

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

print(len(ss))

Submission status: Accepted

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

print(len(set(s)))

Submission status: Accepted

Solution code:
n = int(input())

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

print(len(a))

Submission status: Accepted

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

s = set(s)

print(len(s))

Submission status: Accepted

Solution code:
N=int(input())
Sx={}
for i in range(N):
    S=input()
    if(Sx.get(S)):
        Sx[S]+=1
    else:
        Sx[S]=1

print(len(Sx))

Submission status: Accepted

Solution code:
#!/bin/bash
''':'
docker run --rm -it -v $(cd $(dirname $0) && pwd):/vo:ro pypy:3-2.4.0 \
   /bin/bash -c "pypy3 /vo/$(basename $0) < /vo/input.txt"
exit $?
'''
import sys


def _s(): return sys.stdin.readline().strip()


def _i(): return int(sys.stdin.readline().strip())


def main():
    n = _i()
    s = set()
    for _ in range(n):
        s.add(_s())
    return len(s)


if __name__ == "__main__":
    print(main())

Submission status: Accepted

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

st = set()
for x in arr:
    st.add(x)

print(len(st))

Submission status: Accepted

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

for i in range(n):
    lst.add(input())
    # s = input()
    # if s not in lst:
    #     lst.add(s)

print(len(lst))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

set_s = set(Ss)
print(len(set_s))

Submission status: Accepted

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

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

print(len(set(L)))

Submission status: Accepted

Solution code:
N = int(input())

a = set()

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


print(len(a))

Submission status: Accepted

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
s = set([input() for _ in range(n)])
print(len(s))

Submission status: Accepted

Solution code:
import collections
x=int(input())
list=[]
for i in range(x):
	list.append(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

# N = int(input())
# S = input()

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

dic = {}
ans = 0
for i in S:
    if not(i in dic):
        dic[i] = 1
        ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# n = int(input())
# s = input()
# a = list()
n = int(input())
s = [input() for _ in range(n)]
# a, b, c, d = map(int, input().split())

count = set()
for i in s:
    count.add(i)
print(len(count))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
# K = list(map(int, input().split()))
# N, M = map(int, input().split())
S = []
for i in range(N) :
    S.append(input())

print(len(set(S)))

Submission status: Accepted

Solution code:
from collections import defaultdict
dd = defaultdict(lambda:0)
n = int(input())
for _ in range(n):
    s = input()
    dd[s] += 1
ans = 0    
for k in dd:
    ans += 1
print(ans)

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

set_S = set(S)

print(len(set_S))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

N = int(input().split()[0])
s_dict = collections.defaultdict(int)

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

ans = len(s_dict)
print(ans)

Submission status: Accepted

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

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

print(len(gacha))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
S = set()
for _ in range(n):
    S.add(input())
print(len(list(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 = []
for _ in range(n):
  s.append(input())
s.sort()
ans = 1
for i in range(1,n):
  if s[i-1] != s[i]:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
N = int(input())

result = set()
for _ in range(N):
    result.add(input())

print(len(result))

Submission status: Accepted

Solution code:
def main():
    import sys
    from collections import defaultdict
    sys.setrecursionlimit(10 ** 6)
    input = sys.stdin.readline
    N = int(input())
    D = defaultdict(int)
    for _ in range(N):
        D[input().strip()] += 1
    print(len(D))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(input())
S=[]
for i in range(n):
    S.append(input())
S.sort()
cnt=0
now=""
for s in S:
    if now!=s:
        cnt+=1
    now=s
print(cnt)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import numpy as np
from collections import deque
n = int(input())
s = [0]*n
for i in range(n):
    s[i] = (input())

print(len(set(s)))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
N = int(input())
Ss = [input().strip() for i in range(N)]

Ss = set(Ss)
print(len(Ss))

Submission status: Accepted

Solution code:
LI = lambda: list(map(int,input().split()))
MI = lambda: map(int,input().split())
yes = lambda: print("YES")
no = lambda: print("NO")
I = lambda: list(input())
J = lambda x: "".join(x)
II = lambda: int(input())
SI = lambda: input()
#---khan17---template
n = II()
l = []
for i in range(n):
	l.append(SI())
print(len(set(l)))

Submission status: Accepted

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


print(len(s))

Submission status: Accepted

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

Submission status: Accepted

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

print(len(s))

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

Submission status: Accepted

Solution code:
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce


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


def INT(): return int(input())


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


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


def ZIP(n): return zip(*(MAP() for _ in range(n)))


sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


def main():
    n = INT()
    s = [input() for _ in range(n)]
    s = set(s)

    print(len(s))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
item = {}
count = 0
for i in range(N):
    S = input()
    if S not in item:
        count += 1
        item[S] = 0
print(count)

Submission status: Accepted

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

import sys

DEBUG = False

def read(t):
    return t(sys.stdin.readline().rstrip())


def read_list(t, sep = " "):
    return [t(s) for s in sys.stdin.readline().rstrip().split(sep)]


def dprint(*args, **kwargs):
    if DEBUG:
        print(*args, **kwargs)
    return


def main():
    n = read(int)
    s = set()
    for _ in range(n):
        s.add(read(str))
    print(len(s))


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
printV = lambda x: print(*x, sep="\n")
printH = lambda x: print(" ".join(map(str,x)))
def IS(): return sys.stdin.readline()[:-1]
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LII(rows_number): return [II() for _ in range(rows_number)]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]
mo = 10**9+7

def main():
	n = II()
	d=defaultdict(lambda: -1)
	ans = 0
	for i in range(n):
		s = IS()
		if d[s]==-1:
			d[s]=1
			ans+=1
	print(ans)



if __name__ == '__main__':
	main()

Submission status: Accepted

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

Submission status: Accepted

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

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

print(len(my_s))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

print(len(result))

Submission status: Accepted

Solution code:
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,copy,time
sys.setrecursionlimit(10**8)
input = sys.stdin.readline
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp():
    '''
    一つの整数
    '''
    return int(input())
def inpl():
    '''
    一行に複数の整数
    '''
    return list(map(int, input().split()))
def inpl_str():
    '''
    一行に複数の文字
    '''
    return list(input().split())

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

Submission status: Accepted

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

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

print(len(d))

Submission status: Accepted

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

Submission status: Accepted

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

print(len(i))

Submission status: Accepted

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

print(len(set(lis)))

Submission status: Accepted

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

print(len(list(set(s))))
# a, b, c, d = map(int, input().split())
# x = list(map(int, input().split()))

Submission status: Accepted

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

print(len(K))

Submission status: Accepted

Solution code:
from heapq import heappush, heappop
from itertools import permutations, accumulate, combinations
from math import pi, ceil, floor
import numpy as np
from collections import defaultdict, deque, Counter
from operator import itemgetter
from bisect import bisect_left, bisect_right, insort_left, insort_right
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(10 ** 6)
# MOD = 10 ** 9 + 7
# INF = float("inf")


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

import sys
import pprint

sys.setrecursionlimit(10 ** 6)

class Logger:
	def __init__(self, debug):
		self.debug = debug
	def print(self, *args):
		if self.debug:
			pprint.pprint(args)


def main():
	log = Logger(1)
	n = int(sys.stdin.readline())
	s = []
	for i in range(n):
		s.append(input())
	print(len(set(s)))
	


main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
dic = {}
for i in range(n):
    s = input()
    try:
        dic[s] += 0
    except:
        dic[s] = 1
print(sum(dic.values()))

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10000000)


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



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

s_list = []

for i in range(N):
    s_list.append(input().split()[0])

print(len(set(s_list)))

Submission status: Accepted

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

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

s.sort()

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

print(count)

Submission status: Accepted

Solution code:

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

    print(len(set([input() for i in range(N)])))


if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
li = dict()
for i in range(a):
    li[input()] = 1

print(len(li))

Submission status: Accepted

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

for i in range(gacha_times):
    dic[input()] = True

print(len(dic.keys()))

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

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

from collections import Counter

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

Submission status: Accepted

Solution code:
from collections import defaultdict
n = int(input())
al = [0] * n
for i in range(n):
    al[i] = input()
d = defaultdict(lambda: 0)
for a in al:
    d[a] += 1
print(len(d))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# import bisect
from collections import Counter, deque # https://note.nkmk.me/python-scipy-connected-components/
# from copy import copy, deepcopy
# from functools import reduce
# from heapq import heapify, heappop, heappush
# from itertools import accumulate, permutations, combinations, combinations_with_replacement, groupby, product
# import math
# import numpy as np  # Pythonのみ！
# from operator import xor
# import re
# from scipy.sparse.csgraph import connected_components  # Pythonのみ！
# ↑cf.  https://note.nkmk.me/python-scipy-connected-components/
# from scipy.sparse import csr_matrix
# import string
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():

    N=int(input())
    l=[]
    for i in range(N):
        l.append(str(input()))
    L=Counter(l)
    print(len(L))



resolve()

Submission status: Accepted

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

for n in range(N):
    s = input()
    S.append(s)

print(len(set(S)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import heapq
from collections import deque

# sys.setrecursionlimit(100001)
INF = sys.maxsize


# ===CODE===
def main():
    n = int(input())

    rslt = set()


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

    print(len(rslt))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 6)  # 再帰関数の再帰の深さを設定
to_index = lambda x: int(x) - 1  # 入力した数字に1を引いたものを返す
print_list_in_2D = lambda x: print(*x, sep="\n")  # リストの要素を改行を挟んで表示する関数

# 入力を整数に変換して受け取る
def input_int(): return int(input())

def map_int_input(): return map(int, input())

MII = map_int_input

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

def MII_to_index(): return map(to_index, input())

def MII_split_to_index(): return map(to_index, input().split())

# 入力全てを整数に変換したものの配列を受け取る
def list_int_inputs(): return list(map(int, input()))

LII = list_int_inputs

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

# 2次元リスト化
def LII_2D(rows_number): return [LII() for _ in range(rows_number)]

def LII_split_2D(rows_number): return [LII_split() for _ in range(rows_number)]

N = input_int()
Ss = [input() for _ in range(N)]

print(len(set(Ss)))

Submission status: Accepted

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

print(len(set(List)))

Submission status: Accepted

Solution code:
import sys
from collections import Counter
sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    n = int(input())
    S = list(input() for _ in range(n))
    D = Counter(S)
    print(len(D))

if __name__ == '__main__':
    resolve()

Submission status: Accepted

Solution code:

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


if __name__ == '__main__':
    main()

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

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

sys.setrecursionlimit(100000)
input = sys.stdin.readline
ACMOD = 1000000007
INF = 1 << 62


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


def llmi(n):
    return [lmi() for _ in range(n)]

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

Submission status: Accepted

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

N = int(readline())
S = [readline().strip() for i in range(N)]

print(len(set(S)))

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
INF = 10**10
N = int(input())
ls = []
for n in range(N):
    ls.append(input())
print (len(set(ls)))

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

print(len(set(s_inputs)))

Submission status: Accepted

Solution code:
import math
import keyword

def Next(): return input()
def NextInt(): return int(Next())
def NextInts(): return map(int,input().split())
def Nexts(): return map(str,input().split())
def NextIntList(): return list(map(int,input().split()))
def RowInts(n): return [input() for i in range(n)]

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

Submission status: Accepted

Solution code:
N = int(input())
S = [input() for k 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:
n = int(input())
s = {}
for i in range(n):
    temp = input()
    s.setdefault(temp, 0)
    s[temp] += 1
print(len(s))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
dict1={}
for i in range(n):
	s=str(input())
	try:
		dict1[s]+=1
	except:
		KeyError
		dict1[s]=1

print(len(dict1.keys()))

Submission status: Accepted

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

print(len(S))

Submission status: Accepted

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


def solve(N: int, S: "List[str]"):
    l = set(S)
    print(len(l))
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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:
a = int(input())
l = []

for i in range(a):
  t= input()
  l.append(t)
print(len(set(l)))

Submission status: Accepted

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

N = int(input())

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

print(len(set(S)))

Submission status: Accepted

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

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

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

ans = len(set(A))
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

slist=sorted(slist)
if n==1:
    print(1)
else:
    answer=1
    for sl in range(len(slist)-1):
        if slist[sl]!=slist[sl+1]:
            answer+=1
    print(answer)

Submission status: Accepted

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

ans = len(goods)
print(ans)

Submission status: Accepted

Solution code:
import sys
from math import ceil, floor, sqrt, sin, cos, pi
from itertools import accumulate, permutations, combinations
from fractions import gcd # 最大公約数
from collections import deque, Counter
from operator import itemgetter
from heapq import heappop,heappush
sys.setrecursionlimit(10**7)
def lcm(x, y): return ((x * y) // gcd(x, y)) # 最小公倍数
# list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a = int(input())
c = [input() for i in range(a)]

print(len(set(c)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import Counter
n = int(input())
s = [input() for _ in range(n)]
c = Counter(s)
print(len(c))

Submission status: Accepted

Solution code:
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

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

print(len(Counter(T)))

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:
# coding: utf-8

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

print(len(set(l)))