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:
# abc164_c.py
# https://atcoder.jp/contests/abc164/tasks/abc164_c

# C - gacha /
# 実行時間制限: 2 sec / メモリ制限: 1024 MB
# 配点 : 300点

# 問題文
# くじ引きを N回行い、i 回目には種類が文字列 Siで表される景品を手に入れました。
# 何種類の景品を手に入れましたか？

# 制約
#     1≤N≤2×105
#     Siは英小文字のみからなり、長さは 1 以上 10以下

# 入力
# 入力は以下の形式で標準入力から与えられる。
# N
# S1
# :
# SN

# 出力
# 何種類の景品を手に入れたか出力せよ。

# 入力例 1
# 3
# apple
# orange
# apple

# 出力例 1
# 2

# apple と orange の 2種類の景品を手に入れました。

# 入力例 2
# 5
# grape
# grape
# grape
# grape
# grape

# 出力例 2
# 1

# 入力例 3
# 4
# aaaa
# a
# aaa
# aa

# 出力例 3
# 4


global FLAG_LOG
FLAG_LOG = False


def log(value):
    # FLAG_LOG = True
    # FLAG_LOG = False
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    # S = lines[0]
    N = int(lines[0])
    # N, M = list(map(int, lines[0].split()))
    # values = list(map(int, lines[1].split()))
    # values = list(map(int, lines[2].split()))
    values = list()
    for i in range(N):
        values.append(lines[i+1])
    # valueses = list()
    # for i in range(N):
    #     valueses.append(list(map(int, lines[i+1].split())))

    tmps = list()
    for value in values:
        tmps.append(value)

    log(list(set(tmps)))
    result = len(list(set(tmps)))

    return [result]


# 引数を取得
def get_input_lines():
    line = input()
    N = int(line)
    lines = list()
    lines.append(line)
    for _ in range(N):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['3', 'apple', 'orange', 'apple']
        lines_export = [2]
    if pattern == 2:
        lines_input = ['5', 'grape', 'grape', 'grape', 'grape', 'grape']
        lines_export = [1]
    if pattern == 3:
        lines_input = ['4', 'aaaa', 'a', 'aaa', 'aa']
        lines_export = [4]
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode


# 主処理
def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines()
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    # if mode > 0:
    #     print(f'lines_input=[{lines_input}]')
    #     print(f'lines_export=[{lines_export}]')
    #     print(f'lines_result=[{lines_result}]')
    #     if lines_result == lines_export:
    #         print('OK')
    #     else:
    #         print('NG')
    # finished = time.time()
    # duration = finished - started
    # print(f'duration=[{duration}]')


# 起動処理
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
d = {}
for _ in range(int(input())):
    d[input()] = ""
print(len(d))

Submission status: Accepted

Solution code:
from sys import stdin
import sys, math

n = int(stdin.readline().rstrip())

s = set()

for i in range(n):
    s.add(stdin.readline().rstrip())

print(len(s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, *S = open(0);print(len(set(S)))

Submission status: Accepted

Solution code:
N, *S = open(0)
print(len(set(S)))

Submission status: Accepted

Solution code:
import sys
N = int(input())
S = [str(s) for s in sys.stdin.read().split()]
print(len(set(S)))

Submission status: Accepted

Solution code:
import sys
from collections import Counter
N = int(input())
S = [str(s) for s in sys.stdin.read().split()]
items = list(dict.fromkeys(S))
print(len(items))

Submission status: Accepted

Solution code:
N = int(input())

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

print(len(s))

Submission status: Accepted

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

Submission status: Accepted

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

print(len(S))

Submission status: Accepted

Solution code:
N = int(input())

print(len({input() for _ in range(N)}))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict
n=int(input())
d=defaultdict(int)

for x in range(n):
  d[input()]+=1
  
print(len(d))

Submission status: Accepted

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

Submission status: Accepted

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

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 = [input() for _ in range(N)]
S.sort()
cnt = 1
for i in range(1,N):
  if S[i] != S[i-1]:
    cnt+=1
print(cnt)

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

Submission status: Accepted

Solution code:
n = int(input());

dict = {}

for i in range(n):
    s = input();
    if not s in dict:
        dict[s] = 1

sum = 0
for i in dict:
    sum += 1

print(sum)

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(S)))

Submission status: Accepted

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

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

print(len(s_set))

Submission status: Accepted

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

newLs = list(set(ls))
print(len(newLs))

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10**7)
input = sys.stdin.readline

n = int(input())

se = set()
for i in range(n):
    s = input().rstrip()
    se.add(s)

print(len(se))

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    s={""}
    for _ in range(N):
        s.add(input())
    
    return len(s)-1

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

Submission status: Accepted

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

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 numpy as np
#import math
#from decimal import *
#from numba import njit

#@njit
def main():
    N = int(input())
    s = set()
    for _ in range(N):
        s.add(input())
    print(len(s))

main()

Submission status: Accepted

Solution code:
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


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

Submission status: Accepted

Solution code:
N = int(input())

aaa = {}
for i in range(N):
  aaa[input()] = 1  

print(len(aaa))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# C gacha

N = int(input())

goods = set()
cnt = 0
for i in range(N):
  S = input()
  if S not in goods:
    goods.add(S)
    cnt += 1
print(cnt)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
N = int(input())
S = [input() for _ in range(N)]
S.sort()
check = [True]*N
item = ""
item_ = ""
dict_item = {}
cnt = 0

for i in range(N):
  item_ = S[i]
  if item_ != item:
    item = item_
    cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
import collections

N = int(input())
S=[]
for i in range(N):
  S.append(input())
ans=collections.Counter(S)
print(len(ans.keys()))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

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

c = collections.Counter(S)

ans = 0
for key in c:
    ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
S = {input() for _ in range(N)}
print(len(S))

Submission status: Accepted

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

print(len(list(set(S))))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

print(len(res))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

print(len(S))

Submission status: Accepted

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

import collections

x = collections.Counter(list)
y = x.keys()
print(len(y))

Submission status: Accepted

Solution code:
from math import *

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

s=set(a)
print(len(s))

Submission status: Accepted

Solution code:
def l_in(type_): return list(map(type_, input().split()))
def i_in(): return int(input())
def m_in(type_): return map(type_, input().split())
def r_in(n, type_): return [type_(input()) for _ in range(n)]
ans = None

n = i_in()
d = {}
for _ in range(n):
    k = input()
    d[k] = 1
ans = len(d)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

N=int(input())
S=[""]*N
for i in range(N):
  S[i]=input()
print(len(collections.Counter(S)))

Submission status: Accepted

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

Submission status: Accepted

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

print(len(s))

Submission status: Accepted

Solution code:
from collections import Counter

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

counter = Counter(S)
print(len(counter.keys()))

Submission status: Accepted

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

def main():
    N = int(input())
    S = set([input().rstrip() for _ in range(N)])
    print(len(S))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

print(len(set(S)))

Submission status: Accepted

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

for i in s:
    myset.add(i)

print(len(myset))

Submission status: Accepted

Solution code:
def main():
    _, *S = open(0)
    print(len(set(S)))
 
 
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(S_list)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
stock = {}
for _ in range(int(input())):
  s = input()
  try:
    stock[s] += 1
  except KeyError:
    stock[s] = 1
print(len(stock))

Submission status: Accepted

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

l = []

for _ in range(N):
    l.append(str(input()))
    
c = Counter(l)

print(len(c))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


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


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


def main():
    solve()


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

n = int(input())
s = [input() for i in range(n)]
t = collections.Counter(s)

print(len(t))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

sn = {}
for i in range(n):
  s = input()
  if not s in sn:
    sn[s] = 1
  else :
    sn[s] += 1
  
print(len(sn))

Submission status: Accepted

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

Submission status: Accepted

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

uniq = set(s)
print(len(uniq))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print(len(dict))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

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

Submission status: Accepted

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

n, s = int(input()), set([])
for i in range(n): s.add(input()[:-1])
print(len(s))

Submission status: Accepted

Solution code:
n=int(input())
li=[]
res = 1
for i in range(n):
    li += [input()]
la=sorted(li)
for i in range(1,n):
    if la[i-1]!=la[i]:res += 1
print(res)

Submission status: Accepted

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

# N = 5
# S = ['aa', 'a', 'aa', 'aaaa', 'aa']

C = dict([s,1] for s in S)
L = len(C)
print(L)

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

cnt = {}
ans =0
for s in ss:
    if s not in cnt:
        cnt[s]=0
        ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

import io
import sys
import math

def solve():
    # implement process
    pass

def main():
    # input
    n = int(input())
    s_list = []
    for s in range(n):
      s_list.append(input())
    
    # process
    s_set = set(s_list)
    ans = str( len( s_set) )
    
    # output
    print(ans)
    return ans
        
### DEBUG I/O ###
_DEB = 0   # 1:ON / 0:OFF

_INPUT = """\
5
grape
grape
grape
grape
grape
"""
_EXPECTED = """\
1
"""

def logd(str):
    """usage:
    if _DEB: logd(f"{str}")
    """
    if _DEB: print(f"[deb] {str}")

### MAIN ###
if __name__ == "__main__":
    if _DEB:
        sys.stdin = io.StringIO(_INPUT)
        print("!! Debug Mode !!")

    ans = main()

    if _DEB:
        print()
        if _EXPECTED.strip() == ans.strip(): print("!! Success !!")
        else: print(f"!! Failed... !!\nANSWER:   {ans}\nExpected: {_EXPECTED}")

Submission status: Accepted

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

import io
import sys
import math

def solve():
    # implement process
    pass

def main():
    # input
    n, *a = open(0).read().split()
    
    # process
    s_list = list(a)
    s_set = set()
    for s in s_list:
      s_set.add(s)
    
    ans = str( len( s_set) )
    
    # output
    print(ans)
    return ans
        
### DEBUG I/O ###
_DEB = 0   # 1:ON / 0:OFF

_INPUT = """\
5
grape
grape
grape
grape
grape
"""
_EXPECTED = """\
1
"""

def logd(str):
    """usage:
    if _DEB: logd(f"{str}")
    """
    if _DEB: print(f"[deb] {str}")

### MAIN ###
if __name__ == "__main__":
    if _DEB:
        sys.stdin = io.StringIO(_INPUT)
        print("!! Debug Mode !!")

    ans = main()

    if _DEB:
        print()
        if _EXPECTED.strip() == ans.strip(): print("!! Success !!")
        else: print(f"!! Failed... !!\nANSWER:   {ans}\nExpected: {_EXPECTED}")

Submission status: Accepted

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

import io
import sys
import math

def solve():
    # implement process
    pass

def main():
    # input
    n, *a = open(0).read().split()
    
    # process
    s_list = list(a)
    ans = str( len( set(s_list)) )
    
    # output
    print(ans)
    return ans
        
### DEBUG I/O ###
_DEB = 0   # 1:ON / 0:OFF

_INPUT = """\
5
grape
grape
grape
grape
grape
"""
_EXPECTED = """\
1
"""

def logd(str):
    """usage:
    if _DEB: logd(f"{str}")
    """
    if _DEB: print(f"[deb] {str}")

### MAIN ###
if __name__ == "__main__":
    if _DEB:
        sys.stdin = io.StringIO(_INPUT)
        print("!! Debug Mode !!")

    ans = main()

    if _DEB:
        print()
        if _EXPECTED.strip() == ans.strip(): print("!! Success !!")
        else: print(f"!! Failed... !!\nANSWER:   {ans}\nExpected: {_EXPECTED}")

Submission status: Accepted

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

import io
import sys
import math

def solve():
    # implement process
    pass

def main():
    # input
    n = int(input())
    s_set = set()
    for _ in range(n):
        s_set.add(input())
    
    # process
    ans = str( len(s_set) )
    
    # output
    print(ans)
    return ans
        
### DEBUG I/O ###
_DEB = 0   # 1:ON / 0:OFF

_INPUT = """\
5
grape
grape
grape
grape
grape
"""
_EXPECTED = """\
1
"""

def logd(str):
    """usage:
    if _DEB: logd(f"{str}")
    """
    if _DEB: print(f"[deb] {str}")

### MAIN ###
if __name__ == "__main__":
    if _DEB:
        sys.stdin = io.StringIO(_INPUT)
        print("!! Debug Mode !!")

    ans = main()

    if _DEB:
        print()
        if _EXPECTED.strip() == ans.strip(): print("!! Success !!")
        else: print(f"!! Failed... !!\nANSWER:   {ans}\nExpected: {_EXPECTED}")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())

s=[None]*n
for i in range(n):
    s[i]=input()
    
t=set(s)

print(len(t))

Submission status: Accepted

Solution code:
N = int(input())

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

print(len(S))

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

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

Submission status: Accepted

Solution code:
n=int(input())
lst=set([])
counter=0
for _ in range(n):
    s=input()
    if s in lst : continue
    lst.add(s)
    counter+=1

print(counter)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import collections
import fractions
import itertools
 
def solve():
    n = int(input())
    s = [input() for i in range(n)]
    print(len(set(s)))
    return 0
 
if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
C = {}
for _ in range(N):
    s = input().strip()
    if s not in C:
        C[s] = 0
    C[s] += 1
print(len(C))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import collections
import fractions
import itertools

def solve():
    n = int(input())
    s = [input() for i in range(n)]
    print(len(set(s)))
    return 0

if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
data = stdin.readlines()

n = int(data[0].split()[0])

l = []
for i in range(n):
    l.append(data[i+1].split()[0])
print(len(set(l)))

Submission status: Accepted

Solution code:
n=int(input())

l=[]
for i in range(n):
    w=input()
    l.append(w)
    
ll=set(l)
print(len(set(l)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
import sys
sys.setrecursionlimit(10 ** 9)
# input = sys.stdin.readline    ####
def int1(x): return 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)]
def MS(): return input().split()
def LS(): return list(input())
def LLS(rows_number): return [LS() for _ in range(rows_number)]
def printlist(lst, k=' '): print(k.join(list(map(str, lst))))
INF = float('inf')
# from math import ceil, floor, log2
# from collections import deque
# from itertools import combinations as comb, combinations_with_replacement as comb_w, accumulate, product, permutations
# from heapq import heapify, heappop, heappush
# import numpy as np    # cumsum
# from bisect import bisect_left, bisect_right

def solve():
    N = II()
    S = set()
    for i in range(N):
        s = input()
        S.add(s)
    print(len(S))
    

if __name__ == '__main__':
    solve()

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
print(len({*open(0).read().split()}) - 1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#164C
#gacha

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

Submission status: Accepted

Solution code:
from collections import deque
n = int(input())
l = deque()
for i in range(n):
    s = input()
    l.append(s)
print(len(set(l)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

n = int(input())
a = [input() for i in range(n)]
b = collections.Counter(a)
print(len(b))

Submission status: Accepted

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

print(len(s))

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: 	C_fix
# CreatedDate:  2020-06-27 13:59:01 +0900
# LastModified: 2020-06-27 14:04:38 +0900
#


import os
import sys
# import numpy as np
# import pandas as pd


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

print(len(set(name)))

Submission status: Accepted

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

setl=set(ls)
print(len(setl))

Submission status: Accepted

Solution code:
n = int(input())

s = set([])
for i in range(n):
  e = input()
  s.add(e)
  
print(len(s))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

l = len(set(S))

print(l)

Submission status: Accepted

Solution code:
n = int(input())

s = set()

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

print(len(s))

Submission status: Accepted

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

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

print(len(set(S)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

import sys
S = set(sys.stdin.readlines())



print(len(S))

Submission status: Accepted

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

s_set = set(s)

print(len(s_set))