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:
#!/usr/bin/env python3
# vim: set fileencoding=utf-8

# pylint: disable=unused-import, invalid-name, missing-docstring, bad-continuation


"""Module docstring
"""

import functools
import heapq
import itertools
import logging
import math
import random
import string
import sys
from argparse import ArgumentParser
from collections import defaultdict, deque
from copy import deepcopy
from typing import Dict, List, Optional, Set, Tuple


def solve(values: List[int], nb: int) -> int:
    for _v in values:
        pass
    return nb


def do_job():
    "Do the work"
    LOG.debug("Start working")
    # first line is number of test cases
    N = int(input())
    values = set()
    for _ in range(N):
        values.add(input().strip())
    print(len(values))


def print_output(testcase: int, result) -> None:
    "Formats and print result"
    if result is None:
        result = "IMPOSSIBLE"
    print("Case #{}: {}".format(testcase + 1, result))
    # 6 digits float precision {:.6f} (6 is the default value)
    # print("Case #{}: {:f}".format(testcase + 1, result))


def configure_log() -> None:
    "Configure the log output"
    log_formatter = logging.Formatter("%(lineno)d - " "%(message)s")
    handler = logging.StreamHandler(sys.stdout)
    handler.setFormatter(log_formatter)
    LOG.addHandler(handler)


LOG = None
# for interactive call: do not add multiple times the handler
if not LOG:
    LOG = logging.getLogger("template")
    configure_log()


def main(argv=None):
    "Program wrapper."
    if argv is None:
        argv = sys.argv[1:]
    parser = ArgumentParser()
    parser.add_argument(
        "-v",
        "--verbose",
        dest="verbose",
        action="store_true",
        default=False,
        help="run as verbose mode",
    )
    args = parser.parse_args(argv)
    if args.verbose:
        LOG.setLevel(logging.DEBUG)
    do_job()
    return 0


if __name__ == "__main__":
    import doctest

    doctest.testmod()
    sys.exit(main())


class memoized:
    """Decorator that caches a function's return value each time it is called.
    If called later with the same arguments, the cached value is returned, and
    not re-evaluated.
    """

    def __init__(self, func):
        self.func = func
        self.cache = {}

    def __call__(self, *args):
        try:
            return self.cache[args]
        except KeyError:
            value = self.func(*args)
            self.cache[args] = value
            return value
        except TypeError:
            # uncachable -- for instance, passing a list as an argument.
            # Better to not cache than to blow up entirely.
            return self.func(*args)

    def __repr__(self):
        """Return the function's docstring."""
        return self.func.__doc__

    def __get__(self, obj, objtype):
        """Support instance methods."""
        return functools.partial(self.__call__, obj)

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

ans = len(set(lst))

print(ans)

Submission status: Accepted

Solution code:
import math
N = int(input())
di = {}
count = 0
for i in range(N):
    word = input()
    if word not in di:
        di[word] = 1
        count += 1
    else:
        di[word] += 1
print(count)

Submission status: Accepted

Solution code:
n = int(input())

S_list = []
for i in range(0,n) :
  S_list.append(input())
  
x = len(set(S_list))
print(x)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# n,m = map(int,sys.stdin.readline().split())
# a = list(map(int,sys.stdin.readline().split()))
# a = [sys.stdin.readline() for _ in range(n)]
# s = sys.stdin.readline().rstrip()
# n = int(sys.stdin.readline())
import sys,bisect
sys.setrecursionlimit(15000)

n = int(sys.stdin.readline())
a = [sys.stdin.readline() for _ in range(n)]

import collections
c = collections.Counter(a)
print(len(c))

Submission status: Accepted

Solution code:
import collections

N=int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()

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

ans = set(all)
print(len(ans))

Submission status: Accepted

Solution code:
n=int(input())

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

print(len(set(a)))

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    count = 0
    num = int(input())
    lotteryList = []
    for i in range(0,num):
        lotteryList.append(str(input()))

    lotterySet = set(lotteryList)
    count=len(lotterySet)
    print("{}".format(count))

Submission status: Accepted

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

print(len(s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

resolve()

Submission status: Accepted

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

Submission status: Accepted

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

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

print(len(P))

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

print(len(Ss))

Submission status: Accepted

Solution code:
n = int(input())

d = {}
for _ in range(n):
    s = input()
    if not s in d:
        d[s] = 0
        
print(len(d.keys()))

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    # 入力パターン．
    # 先に要素数Nが与えられて，その数読み込むパターン
    ### N
    ### d_1 
    ### ...
    ### d_N
    N = int(input())
    d = [str(input()) for _ in range(N)]
    print(len(set(d)))

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

n = int(input())

s = [None]*n

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

syugou = list(set(s))

ans = len(syugou)

print(ans)

Submission status: Accepted

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

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

print(len(shurui))

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(S)))

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

print(len(sSet))

Submission status: Accepted

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

from collections import Counter

c = Counter(S)

print(len(c))

Submission status: Accepted

Solution code:
n = int(input())
s = []
for i 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())
S = [""]*N
for i in range(N):
  S[i] = str(input())

S = set(S)

print(len(S))

Submission status: Accepted

Solution code:
N = int(input())
o = {}
for _ in range(N):
    o.setdefault(input(), "")
print(len(set(o)))

Submission status: Accepted

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

Submission status: Accepted

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

l2 = collections.Counter(l)

print(len(l2))

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
from collections import Counter
N=int(sys.stdin.readline().strip())
S=[ sys.stdin.readline().strip() for _ in range(N) ]
C=Counter(S)
print len(C)

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

for _ in range(N):
    s = input()
    ans.add(s)
print(len(ans))

Submission status: Accepted

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

print(len(set(S)))

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())
#W = map(int, input().split())
S = set([input() for _ in range(N)])

print(len(S))

Submission status: Accepted

Solution code:
N = int(input())

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

print(len(set(k)))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
dict1={}
for i in range(n):
    s=input()
    dict1[s]=dict1.get(s,0)+1
print(len(dict1))

Submission status: Accepted

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

Submission status: Accepted

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

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

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


c = collections.Counter(S)

print(len(c))

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    s = {"",""}
    s.clear()
    n = int(input())
    for i in range(0,n):
        s.add(input())
    print(len(s))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

counter = set([])

for i in range(N):
    si = input()
    if si not in counter:
        counter.add(si)

print(len(counter))

Submission status: Accepted

Solution code:
N = int(input())

prize = set()

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

print(len(prize))

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(r)))

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(s)))

Submission status: Accepted

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

S_Set=set(S)

print(len(S_Set))

Submission status: Accepted

Solution code:
import collections

n = int(input())
text = []
for i in range(n):
  s = input()
  text.append(s)
print(len(collections.Counter(text)))

Submission status: Accepted

Solution code:
import sys

N=int(input())

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

print(len(S))

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
def print_ans(N, ar):
    """Test Case
    >>> print_ans(3, ["apple", "orange", "apple"])
    2
    >>> print_ans(5,["grape" ,"grape" ,"grape" ,"grape" ,"grape"])
    1
    """
    print(len(set(ar)))
    

if __name__ == '__main__':
    N = int(input().rstrip())
    ar = [input().rstrip() for _ in range(N) ]
    print_ans(N, ar)

Submission status: Accepted

Solution code:
n = int(input())
dic = {}
for _ in range(n):
    f = input()
    if f in dic.keys():
        dic[f] += 1
    else:
        dic[f] = 1
print(len(dic))

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 = [list(input().split()) for i in range(n)]
import numpy as np
s2 = np.ravel(s)
print(len(set(s2)))

Submission status: Accepted

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

print(len(set(arr)))

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:


def main():
    N = int(input())
    S = [input() for i in range(N)]

    sortS = sorted(S)


    count = 0
    for i in range(len(sortS)):
        if i == 0:
            count += 1
            continue
        else:
            if sortS[i-1] == sortS[i]:
                continue
            else:
                count += 1

    print(count)








if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter

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

newS = dict(Counter(S))
print(len(newS))

Submission status: Accepted

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

print(len(set(L)))

Submission status: Accepted

Solution code:
import sys

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

mydict = {}

for i in range(N):
    mydict[S[i]] = 0

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

cnt = 0
for key in mydict.keys():
    cnt += 1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input()) #1行目のNを取得する
s = [input() for i in range(N)] #複数行の数値の入力を取得
#print(s) #出力：['s_1', 's_2', 's_3', 's_N']
set = set(s)
#print(set)
print(len(set))

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(s)))

Submission status: Accepted

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

Submission status: Accepted

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

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

import collections
c = collections.Counter(gacha)  
  
print(len(c))

Submission status: Accepted

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

for i in range(n):

    a.append(input())

a=set(a)

print(len(a))

Submission status: Accepted

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

set_list = set(list)
print(len(set_list))

Submission status: Accepted

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

print(len(set(s_list)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

keihin = []

for i in range(N):
    keihin.append(input())
    
print(len(set(keihin)))

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(ansl)))

Submission status: Accepted

Solution code:
num_val = int(input())
item_list = [input() for i in range(num_val)]

print(len(set(item_list)))

Submission status: Accepted

Solution code:
import sys
#sys.exit()
#sorted( ,reverse=True)
N = int(input())
#S,T = map(int, input().split())
#A = list(map(int, input().split()))
#print(N)
#print(S,T)
#print(A)
S = list(str(input()) for i in range(N))
S2 = sorted(S)
ans = N
#if S2[0] ==S2[1]:
    #ans -= 1
for i in range(1,N):
    if S2[i-1] == S2[i]:
        ans -= 1
print(ans)

Submission status: Accepted

Solution code:
"""
import random
import functools
import copy
import bisect
import array
import re
import collections
import heapq
import fractions
import itertools
import string
import math
from operator import itemgetter as ig
from bisect import bisect_left, bisect_right, insort_left, insort_right
from itertools import permutations, combinations, product, accumulate, groupby
from heapq import heappush, heappop
from collections import deque, defaultdict, Counter
import sys
sys.setrecursionlimit(10 ** 7)
# import numpy as np

inf = 10 ** 20
INF = float("INF")
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = dd + [(-1, 1), (1, 1), (1, -1), (-1, -1)]
ddn9 = ddn + [(0, 0)]
'''for dx, dy in dd:
        nx = j + dx; ny = i + dy
            if 0 <= nx < w and 0 <= ny < h:'''
"""
from collections import deque, defaultdict, Counter
import math
import sys
sys.setrecursionlimit(10 ** 7)


def wi(): return list(map(int, sys.stdin.readline().split()))
# WideIntPoint


def wip(): return [int(x) - 1 for x in sys.stdin.readline().split()]


def ws(): return sys.stdin.readline().split()


def si(): return int(sys.stdin.readline())  # SingleInt


def ss(): return input()


def hi(n): return [si() for _ in range(n)]


def hs(n): return [ss() for _ in range(n)]  # HeightString


def s_list(): return list(input())


def mi(n): return [wi() for _ in range(n)]  # MatrixInt


def mip(n): return [wip() for _ in range(n)]


def ms(n): return [ws() for _ in range(n)]


def num_grid(n): return [[int(i) for i in sys.stdin.readline().split()[
    0]] for _ in range(n)]  # NumberGrid


def grid(n): return [s_list() for _ in range(n)]


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

# a/b の切り上げ


def round_up(a, b):
    """ a/b の切り上げ """
    c = (a + b - 1) / b
    return c


def lcm(a, b):
    """a,bの最小公倍数"""
    return a * b // gcd(a, b)


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

    print(len(s))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
ans_set = set()
for i in range(N):
    ans_set.add(str(input()))
print(len(ans_set))

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 26 20:57:43 2020
"""

import sys
#import numpy as np

sys.setrecursionlimit(10 ** 9)
#def input():
#    return sys.stdin.readline()[:-1]
mod = 10**9+7

N = int(input())
S = [input() for _ in range(N)]
#A = list(map(int,input().split()))

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

dicts = {}
ans = 0
for i in S:
    if i not in dicts.keys():
        ans += 1
        dicts[i] = 0

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
d=dict()
for i in range(N):
    S=input()
    if S in d:
        d[S]+=1
    else:
        d[S]=1
print(len(d))

Submission status: Accepted

Solution code:
N = int(input())

kinds = []

for i in range(N):
  kinds.append(input())
  
print(len(set(kinds)))

Submission status: Accepted

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

Submission status: Accepted

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

#print( s )

kind = {}

for i in range( n ):
    try:
        kind[ s[i] ] += 1
    except KeyError:
        kind[ s[i] ] = 0

print( len( kind.keys() ) )

Submission status: Accepted

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

#output
a = set(S)
print(len(a))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def m():
    n = int(input())
    d = {}
    for _ in range(n):
        d[str(input())] = 1
    return len(d.keys())


print(m())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def resolve():
    n = int(input())
    ans = {}
    for i in range(n):
        a = input()
        if a in ans:
            ans[a] += 1
        else:
            ans[a] = 1
    print(len(ans))

resolve()

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
n = input()
s = set()

for _ in xrange(n):
  m = raw_input()
  s.add(m)
print len(s)

Submission status: Accepted

Solution code:
N = int(input())
ss_list = dict()

for _ in range(N):
    s = str(input())
    ss_list[s] = 0

print(len(ss_list))

Submission status: Accepted

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

print(len(set(a)))

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

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

print(len(s))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import Counter

N=int(input())

A=[]

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

c=Counter(A)

print(len(c))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

A=[]

for _ in range(N):
    a=input()
    A.append(a)

A=set(A)

print(len(A))

Submission status: Accepted

Solution code:
N = int(input())

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

D = {}
for s in S:
    if s not in D:
        D[s] = 0
    else:
        D[s] += 1

print(len(D))

Submission status: Accepted

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

Submission status: Accepted

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

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

print(len(list(set(slist))))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

ans = {}

for _ in range(n):
    s = input()

    ans[s] = 1

print(len(ans))

Submission status: Accepted

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

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

print(len(praise))

Submission status: Accepted

Solution code:
n = int(input())

d = dict()

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

print(len(d))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

lines = int(sys.stdin.readline().strip())

inp = list()

for _ in range(lines):
    inp.append(sys.stdin.readline().strip())


print(len(set(inp)))

Submission status: Accepted

Solution code:
import collections
n = int(input())
s = [0 for _ in range(n)]
for i in range(n):
    s[i] = input()
l = collections.Counter(s)
print(len(list(l.values())))

Submission status: Accepted

Solution code:
# python3
# -*- coding: utf-8 -*-
import sys
import math
import bisect
from fractions import gcd
from itertools import count, permutations
from functools import lru_cache
from collections import deque, defaultdict
from pprint import pprint

INF = float('inf')

ii = lambda: int(input())
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
lmtx = lambda h: [list(map(int, lmis())) for _ in range(h)]
sys.setrecursionlimit(1000000000)


def lcm(a, b):
    return (a * b) // gcd(a, b)


# main
n = ii()
slist = []
for _ in range(n):
    slist.append(input())

print(len(set(slist)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

gacha = collections.deque()

for i in range(N):
    gacha.append(input())
   
print(len(collections.Counter(gacha)))

Submission status: Accepted

Solution code:
# coding: utf-8
import sys
sysread = sys.stdin.readline
def run():
    N = int(input())
    S = []
    for _ in range(N):
        S.append(input())
    ret = set()
    for s in S:
        ret.add(s)
    print(len(ret))

if __name__ == "__main__":
    run()

Submission status: Accepted

Solution code:
#https://atcoder.jp/contests/abc164/tasks/abc164_c
# -*- coding: utf-8 -*-
N = int(input())
S = []
for i in range(N):
  S.append(input())
keihin = list(set(S))
print(len(keihin))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

l = set(l)

print(len(l))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(l)))

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(S)))

Submission status: Accepted

Solution code:
N = int(input())

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