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

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

print(len(r))

Submission status: Accepted

Solution code:
import collections 
n=int(input())
s_list=list(input() for _ in range(n))
c=collections.Counter(s_list)
print(len(c.keys()))

Submission status: Accepted

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

main()

Submission status: Accepted

Solution code:
N = int(input(""))
M = []
n = 0

for i in range(N):
    p = input("")
    M.append(p)

Mm = list(set(M))

print(len(Mm))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

list0 = []
for i in range(0,N):
    list0.append(input())

print(len(list(set(list0))))

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

Submission status: Accepted

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


def main():
    n = int(readline().rstrip())
    sList = [""] * n
    for i in range(n):
        sList[i] = readline().rstrip()
    print(len(set(sList)))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

def solve():
    import sys
    N = int(sys.stdin.readline())

    set_ = set()
    for _ in range(N):
        S = sys.stdin.readline().rstrip()
        set_.add(S)

    print(len(set_))


if __name__ == "__main__":
    solve()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import itertools
import math
import fractions
import functools
n = int(input())
keihin = set()
for i in range(n):
    keihin.add(input())

print(len(keihin))

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

Submission status: Accepted

Solution code:
#2020-5-11作成

N = int(input())
got = set()
for i in range(N):
    got.add(input())

print(len(got))

Submission status: Accepted

Solution code:
n = int(input())

l = []

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

res = len(set(l))

print(res)

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import numpy as np

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

s = np.array(s)
s = np.unique(s)

print(len(s))

Submission status: Accepted

Solution code:
def actual(N, s_list):
    return len(set(s_list))

N = int(input())

s_list = []

for _ in range(N):
  s = input()
  s_list.append(s)
    
print(actual(N, s_list))

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())
s = {input() for _ in range(N)}
print(len(s))

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    from sys import stdin
    # from collections import defaultdict, deque
    import math
    import random
    import collections
    input = stdin.readline
    
    N = int(input())
    S = [input() for i in range(N)]

    c = collections.Counter(S)
    num = c.values()
    print(len(num))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# Generated by https://github.com/kyuridenamida/atcoder-tools
import sys

INF = 1145141919


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


def main():

    sys.setrecursionlimit(10 ** 6)

    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]"
    print(solve(N, S))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import copy

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

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

Submission status: Accepted

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

list_x = []

N = int(input())
for i in range(N):
    a = input()
    list_x.append(a)

list_x = set(list_x)

print(len(list_x))

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())
s={input() for _ in range(n)}

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

Submission status: Accepted

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

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:
def main():
    import math
    n=int(input())
    S=set()
    ans=0
    for _ in range(n):
        s=input()
        if s not in S:
            ans+=1
            S.add(s)
    print(ans)
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
se = {-1}
for i in range(N):
  se.add(input())
print(len(se)-1)

Submission status: Accepted

Solution code:
n = int(input())

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

print(len(set(s)))

Submission status: Accepted

Solution code:
import sys
n = int(input())
_set = set()
for i in range(n):
    s = sys.stdin.readline().strip()
    _set.add(s)
print(len(_set))

Submission status: Accepted

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

S.sort()

dup = 0;
for i in range(N):
    if i!=0:
        if S[i] == S[i-1]:
            dup += 1

print(N-dup)

Submission status: Accepted

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

print(len(a))

Submission status: Accepted

Solution code:
import sys,math
#sys.setrecursionlimit(100000000)
input = sys.stdin.readline
 
############ ---- USER DEFINED INPUT FUNCTIONS ---- ############
def inp():
    return(int(input()))
def inara():
    return(list(map(int,input().split())))
def insr():
    s = input()
    return(list(s[:len(s) - 1]))
def invr():
    return(map(int,input().split()))
################################################################
############ ---- THE ACTUAL CODE STARTS BELOW ---- ############

t=inp()
number=set()
for _ in range(t):
	x=input()
	number.add(x)
print(len(number))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def function(args):
    d=dict()
    for s in args:
        d[s] = 0
    
    return str(len(d))

if __name__ == '__main__':
    N=int(input())
    SN = []
    for i in range(N):
        SN.append(input())
    print(function(SN))

Submission status: Accepted

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

print(l)

Submission status: Accepted

Solution code:

n=int(input())
dict={}
sum=0
for i in range(n):
    s=input()
    if s not in dict.keys():
        dict[s]=1
        sum+=1
    else:
        sum+=0
print(sum)

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

Submission status: Accepted

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

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

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):
    s = input()
    a.append(s)

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
from collections import Counter
n=int(input())
l=[]
for i in range(n):
    s=input()
    l.append(s)
freq=dict(Counter(l))
ans=list(freq.values())
print(len(ans))

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(s)))

Submission status: Accepted

Solution code:
"""
at-abc164c.py
2020-05-06
/usr/bin/python3
Info Fields (opt.)
- Type: 
- Keywords: set,
- Notes:
"""
if __name__ == "__main__":
    fruits = set()
    n=int(input())
    for i in range(n):
        fruits.add(input())
    print(len(fruits))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

# 1行 1-str
s_list = []
for i in range(n):
    s = str(input())
    s_list.append(s)

s_list = list(set(s_list))
print(len(s_list))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin


def solve(ls):
    return len(set(ls))


n = int(input())
ls = []
for i in range(n):
    ls.append(stdin.readline())
print(solve(ls))

Submission status: Accepted

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

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

Submission status: Accepted

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

print( len(set(L)))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    input1 = input()
    N = int(input1)
    S = [0]*N
    result = 0
    for i in range(N):
        input2 = input()
        S[i] = str(input2)

    set_S = []
    set_S = set(S)
    result = len(set_S)
    
    print(result)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
goods = set()

n = int(input())

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

print(len(goods))

Submission status: Accepted

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

for i in range(N-1):
  if S[i] !=S[i+1]:
    ans += 1
    
print(ans)

Submission status: Accepted

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

print(len(set(s)))

Submission status: Accepted

Solution code:
# n くじ引きの回数

n = int(input())
x = {}
for i in range(n):
  s = str(input())
  x[s] = 1

print(len(x))

Submission status: Accepted

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

print(len(d))

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

mydict = {}

for i in range(N) :
  s = input()
  if(s in mydict) :
    continue
  else :
    mydict[s] = 1
    
    
print(len(mydict))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from typing import List

def gacha_kinds(N: int, S_i: List[str]) -> int:
    kinds = set(S_i)
    return len(kinds)

if __name__ == '__main__':
    N = int(input())
    S_i = [input() for i in range(N)]

    res = gacha_kinds(N, S_i)
    print(res)

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:
"""
at-abc164c.py
2020-05-06
/usr/bin/python3
Info Fields (opt.)
- Type: 
- Keywords:
- Notes:
"""
if __name__ == "__main__":
    fruits = set()
    n=int(input())
    for i in range(n):
        fruits.add(input())
    print(len(fruits))

Submission status: Accepted

Solution code:
### ABC 164 C gacha

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

s_noncov = set(s)

print(len(s_noncov))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

n = int(input())

cur = set()

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

print(len(cur))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
s = [input() for i in range(N)]
k = sorted(s)
d = 0
for i in range(N-1):
	if(k[i] == k[i+1]):
		d+=1
		
print(N-d)

Submission status: Accepted

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


def main():
    n = int(input())
    S = [input() for _ in range(n)]

    print(len(set(S)))


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
sdict = dict()
for _ in range(n):
    s = input()
    try:
        tryproc = sdict[s]
    except:
        sdict[s] = True
print(len(sdict))

Submission status: Accepted

Solution code:
N = int(input())

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

answer = []
answer = list(set(S))

#for i in range(N):
    #if(S[i] not in answer):
        #answer.append(S[i])


print(len(answer))

Submission status: Accepted

Solution code:
N = int(input())

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

    
print(len(clip))

Submission status: Accepted

Solution code:
n = int(input())
result_dict = dict()
for i in range(n):
    string = input()
    result_dict[string] = 1

print(len(result_dict.keys()))

Submission status: Accepted

Solution code:
n = int(input())

get = []

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

print(len(set(get)))

Submission status: Accepted

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

S = set(S)

print(len(S))

Submission status: Accepted

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

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

print(len(set(L)))

Submission status: Accepted

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

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

Submission status: Accepted

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

S.sort()

count = 1

for i in range(N-1):
    if S[i] != S[i+1]:
        count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(s)))

Submission status: Accepted

Solution code:
#  =========     /\       /|    |====/|
#      |        /  \       |    |   / |
#      |       /____\      |    |  /  |
#      |      /      \     |    | /   |
#  ========= /        \  =====  |/====|  
#  code

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
mp = {}
n = int(input())
for i in range(n):
    s = input()
    mp.setdefault(s, 0)
    mp[s] += 1

print(len(mp))

Submission status: Accepted

Solution code:
### ----------------
### ここから
### ----------------

import sys

def yn(b):
    print("Yes" if b==1 else "No")
    return

def resolve():
    readline=sys.stdin.readline
    n=int(readline())
    a=set()
    for i in range(n):
        a.add(readline().rstrip())
    print(len(a))
    return

if 'doTest' not in globals():
    resolve()
    sys.exit()

### ----------------
### ここまで 
### ----------------

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
k = 0
S = list()
while N != k:
    S.append(str(input()))
    k += 1
S = set(S)
print(len(S))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
S = []
for _ in range(N):
  S.append(input())
from collections import defaultdict as ddict
ans = ddict(int)
for s in S:
  ans[s] += 1
print(len(ans))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    N = int(input())
    S_list = [input() for _ in range(N)]
    print(len(list(set(S_list))))

main()

Submission status: Accepted

Solution code:
n = int(input())
s_lst = [str(input()) for _ in range(n)]
s_set = list(set(s_lst))
ans = len(s_set)

print(ans)

Submission status: Accepted

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

print(len(data))

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
mod2 = 998244353
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    n = I()
    s = set(S() for _ in range(n))

    return len(s)


print(main())

Submission status: Accepted

Solution code:
#n, m, q = map(int, input().split())
#List = list(map(int, input().split()))

n = int(input())
List = [input() for i in range(n)]
sort = sorted(List)
ans = 1
for i in range(1,n):
    if sort[i] != sort[i - 1]:
        ans += 1
print(ans)
#print(sort)

Submission status: Accepted

Solution code:
N=int(input())

list_a=[]

for i in range(N):
    list_a.append(input())
    
set_a=set(list_a)

print(len(set_a))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

Ss = {}

for i in range(N):
  s = str(input())
  if not (s in Ss):
    Ss[s] = 1

print(len(Ss))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, *s = open(0).read().split()
print(len(set(s)))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
Items = {}
init = True


for i in range(n):
    s = str(input())
    if init:
        Items[s] = 0
    else:
        Keys = Items.keys()
        duplicate = False
        key = ""
        for j in range(len(Items)):
            if Keys[j] == s:
                duplicate = True
                break
            else:
                duplicate = False
        if duplicate:
            Items[key] += 1
        else:
            Items[s] = 0

print(len(Items))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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())
dic = {}
ans = 0
for i in range(N):
    S = input()
    if dic.get(S) == None:
        dic[S] = 1
        ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

def solve(N: int, S: "List[str]"):
    print(len(set(S)))
    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:
import sys
sys.setrecursionlimit(10 ** 6)
# input = sys.stdin.readline    ####
int1 = lambda x: int(x) - 1
def II(): return int(input())

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

def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

INF = float('inf')

def solve():
    n = II()
    S = [''] * n
    for i in range(n):
        S[i] = input()
        
    print(len(set(S)))

if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
from collections import Counter
def main():
    N=int(input())
    sarr=[]
    for _ in range(N):
        sarr.append(input())
    print(len(Counter(sarr)))
if __name__=='__main__':
    main()

Submission status: Accepted

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

import sys
sys.setrecursionlimit(10**7)
from pprint import pprint as pp
from pprint import pformat as pf

import math
#from sortedcontainers import SortedList, SortedDict, SortedSet # no in atcoder
import bisect


if __name__ == '__main__':
    types = set()
    n = int(input())
    for i in range(n):
        s = input()
        types.add(s)
        #print('types') # debug
        #print(types) # debug
    print(len(types))


    #print('\33[32m' + 'end' + '\033[0m') # debug

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

res = {input() for _ in range(N)}

print(len(res))

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:
print(len({*open(0)})-1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

st = set()
for s in S:
  st.add(s)
print(len(st))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

nn = list(set(n))

print(len(nn))

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

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

print(len(S))

Submission status: Accepted

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

result = {}
for name in S:
    name = name.strip()
    if not name in result:
        result[name] = 0
a = len(result.keys())
print(a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

n = int(input())

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

c = collections.Counter(data)
# print(c)
# Counter({'a': 4, 'c': 2, 'b': 1})

print(len(list(c)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
l = set()
for i in range(N):
  Si = input()
  if not Si in l:
    l.add(Si)
print(len(l))

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(keihin)))