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

N=int(input())
i=0
list=[]

while(i<N) :
  a = str(input())
  list.append(a)
  i+=1

c = Counter(list)

print(len(c))

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

ListN = [""]*N

for i in range(N):
    ListN[i]= str(input())
    
l2 = list(set(ListN))

print (len(l2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


def solve(N: int, S: "List[str]"):
    ans = {}
    for s in S:
        if s in ans:
            ans[s]+=1
        else:
            ans[s]=1
    print(len(ans))
    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 numpy as np
import sys
import math

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

ss = set(S)

print(len(ss))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

import heapq
from collections import defaultdict, deque
from math import ceil, factorial, gcd
from itertools import accumulate
import sys
import bisect

sys.setrecursionlimit(10 ** 7)
INF = float("inf")
MOD = 10 ** 9 + 7

si = lambda: input().strip()
ii = lambda: int(input())
mii = lambda: map(int, input().split())
lmii = lambda: list(map(int, input().split()))
lmsi = lambda: list(map(str, input().split()))
smii = lambda: sorted(map(int, input().split()))

# ----------

N = ii()

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

print(len(S))

Submission status: Accepted

Solution code:
# 2020/04/26
# AtCoder Beginner Contest 164 - C

# Input
n = int(input())
s = dict()

# Calc

for i in range(n):
    ins = input()
    if s.get(ins) == None:
        s[ins] = 1
    else:
        s[ins] = s[ins] + 1
ans = len(s)
# Output
print(ans)

Submission status: Accepted

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

dic = {}

for i in S:
  if i not in dic:
  	dic[i] = 1
  else:
  	dic[i] += 1
else:
  print(len(dic.keys()))

Submission status: Accepted

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

print(len(set(gift)))

Submission status: Accepted

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

print(len(set(cl)))

Submission status: Accepted

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

Submission status: Accepted

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

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

print(len(set(S)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = dict()
for i in range(n):
    tmp = input()
    s.setdefault(tmp)
print(len(s))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
a = [input() for _ in range(N)]
c_dict = {}
for v in a:
    c_dict[v] = 0
print(len(c_dict))

Submission status: Accepted

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

Submission status: Accepted

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

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

l.sort()
cnt = 1

for i in range(len(l) - 1):
    if l[i] != l[i+1]:
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
N=int(input())
S=list(input() for _ in range(N))
S.sort()

out=0
L=0
for i in range(N):
    if S[i]!=L:
        out+=1
    L=S[i]
print(out)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
D = {}
ans = 0

for _ in range(N):
    S = input()
    if S not in D:
        D[S] = True
        ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
numOfLines = int(input())
words = []

for i in range(numOfLines):
    word = input()
    words.append(word)

print(len(set(words)))

Submission status: Accepted

Solution code:
n=int(input())
S = []
for _ in range(n):
    S.append(input())
import collections
c = collections.Counter(S)

print(len(c))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = []
N = int(input())
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)]

s = set(s)

print(len(s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter

# print('input >>')
N = int(input())
Ss = [input() for _ in range(N)]

SsC = Counter(Ss)

print(len(SsC))

# print('-----output-----')

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict

a = defaultdict(int)
n = int(input())
for i in range(n):
    w = input()
    a[w] += 1

print(len(a.items()))

Submission status: Accepted

Solution code:
N = int(input())

cnt = {}

for _ in range(N):
    award = input()
    cnt.setdefault(award, 0)
    cnt[award] += 1
    
print(len(cnt))

Submission status: Accepted

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

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

Submission status: Accepted

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

for i in range(n):
    a.append(input())
b=set(a)
print(len(b))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
##################################
# University of Wisconsin-Madison
# Author: Yaqi Zhang
##################################

# standard library
import sys
from functools import lru_cache

sys.setrecursionlimit(10**9)

Input = lambda: sys.stdin.readline().rstrip()
IntRead = lambda: int(Input())
LineRead = lambda: list(map(int, Input().split()))


INF = 10**18

def main():
    N = IntRead()
    s = set()
    for _ in range(N):
        word = Input()
        s.add(word)
    print(len(s))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
N = int(sys.stdin.readline())
S = [sys.stdin.readline().rstrip() for i in range(N)]
print(len(set(S)))

Submission status: Accepted

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

print(len(s_unique))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import math
    
def abs(num):
    if num < 0:
        return -num
    else:
        return num

###
# main
if(__name__ == '__main__'):
    # input
    n = int(input())
    s_dict = {}
    for _ in range(n):
        s = input()
        s_dict[s] = 1

    print(len(s_dict))
    
# else:
    # do nothing

Submission status: Accepted

Solution code:
if __name__ == "__main__":

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

Submission status: Accepted

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

def main():
    from collections import defaultdict
    N, *S = read().split()
    d = defaultdict(int)
    for s in S:
        d[s] += 1
    print(len(d))
    return

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

S = []

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

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

Submission status: Accepted

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

Submission status: Accepted

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

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
MAP = lambda: map(int, INPUT().split())
S_MAP = lambda: map(str, INPUT().split())
LIST = lambda: list(map(int, INPUT().split()))
S_LIST = lambda: list(map(str, INPUT().split()))

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


def main():
    N = INT()
    S = [INPUT() for _ in range(N)]
    print(len(set(S)))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

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

print(len(c))

Submission status: Accepted

Solution code:
import sys
# sys.stdin = open('input.txt')

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

d = {}
for i in s:
    d[i] = 0
print(len(d))

Submission status: Accepted

Solution code:
N = int(input())
S = {}
for x in range(N):
    tmp = input()
    S[tmp] = 1
print(len(S))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

dic = {}

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

  if(s in dic) :
    dic[s] += 1
  else:
    dic[s] = 1
  


print(len(dic))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input())
h=[]
for i in range(0,a):
    s=input()
    h.append(s)
k=set(h)
l=list(k)
print(len(l))

Submission status: Accepted

Solution code:
from collections import Counter

n = int(input())
S = [input() for _ in range(n)]
S_count = Counter(S)

print(len(S_count.keys()))

Submission status: Accepted

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

print(len(items.keys()))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
S=["" for k in range(N)]
ans=0
for k in range(N):
    S[k]=input()
print(len(set(S)))

Submission status: Accepted

Solution code:
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))


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

print(len(set(s)))

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:
def i1str():
    return input()


def istrs(n=None):
    if n is None:
        return input().split()
    a = []
    for _ in range(n):
        a.append(istrs())
    return a


def i1num():
    return int(input())


def inums(n=None):
    if n is None:
        return list(map(int, input().split()))
    a = []
    for _ in range(n):
        a.append(inums())
    return a


def ostrs(l, sp=" "):
    print(sp.join(l))


def onums(l, sp=" "):
    print(sp.join(map(str, l)))


def solve(n):
    s = set()
    for _ in range(n):
        s.add(input())
    return len(s)


if __name__ == "__main__":
    n = i1num()
    print(solve(n))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def read_int():
    return int(input())

def read_int_map():
    return map(int,input().split(' '))

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

def read_s_list_loop(n):
    return [input() for _ in range(n)]

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

Submission status: Accepted

Solution code:
# Problem C - gacha

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

# initialization
ans = len(set(s_list))

# output
print(ans)

Submission status: Accepted

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

S= []

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

c = collections.Counter(S)

print(len(c))

Submission status: Accepted

Solution code:
#A, B, C, D = list(map(int, input().strip().split()))
N = int(input())
S = set()
for i in range(N):
  tmp = input()
  S.add(tmp)
print(len(S))

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from collections import Counter

n = int(input())
s = [input().replace("\n","") for i in range(n)]

Scnt = Counter(s)
print(len(Scnt.values()))

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    item = [ input() for i in range(N)]
    print(len(set(item)))
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())
s=[]
for i in range(n):
    s.append(input())
print(len(set(s)))

Submission status: Accepted

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

print(len(set(lst)))

Submission status: Accepted

Solution code:
N = int(input())

L = []

for i in range(N):
    L.append(input())
    
A  = len(set(L)) 
print(A)

Submission status: Accepted

Solution code:
n = int(input())

dic = {}
for _ in range(n):
  e = str(input())
  if e in dic:
    continue
  else:
    dic[e] = 0
print(len(dic))

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

Submission status: Accepted

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

print(len(set(lst)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
if N!=0:
    s = [input() for i in [0]*N]
else:
    s = []

s = set(s)

ans = len(s)
print(ans)

Submission status: Accepted

Solution code:
import sys
from collections import Counter

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

m = Counter(S)
print(len(m))

Submission status: Accepted

Solution code:
import sys
n = int(input())
cnt = 1
li=['']*n
for i in range(n):
    li[i] = input()
li.sort()
for i in range(n):
    if (i + 1 == n):
        break
    if (li[i] == li[i + 1]):
        continue
    cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
def main():
    n = int(input())
    s = set()
    for _ in range(n):
        x = input()
        s.add(x)
    print(len(s))
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(S_list)))

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

Solution code:
N=int(input())

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

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

Submission status: Accepted

Solution code:
n = int(input())
d = {}
for i in range(n):
    s = input()
    d.setdefault(s,1)
    
print(len(d))

Submission status: Accepted

Solution code:
n = int(input())
s = [str(input()) for i 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(input())

print(len(ss))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
map = {}
count = 0
for i in range(n):
    s = input()
    if s in map:
        pass
    else:
        count+=1
        map[s] = 1
print(count)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
import math

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np

def main():
    # S = ['grape', 'grape']
    N = int(input())
    S = []
    for _ in range(N):
        S.append(input())

    print(np.unique(S).shape[0])


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    ans_dist = {}
    for _ in range(n):
        ans_dist[input()] = 0
    print(len(ans_dist.keys()))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

mydic = {}
for n in range(N):
    mys = input()
    if mys not in mydic:
        mydic[mys] = 1
    else:
        mydic[mys] += 1
print(len(mydic))

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    N = int(input())
    S = [input() for _ in [0] * N]

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


main()

Submission status: Accepted

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

ans = set(S)

print(len(ans))

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())
d=dict()
for i in range(n):
    si=input()
    if si in d:
        d[si]=d[si]+1
    else:
        d[si]=1
        
print(len(d))

Submission status: Accepted

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


def solve(N: int, S: "List[str]"):
    s = set()

    for thing in S:
        s.add(thing)

    print(len(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:
def main():
    n = int(input())
    s = {input() for _ in range(n)}
    print(len(s))
if __name__ == "__main__":
    main()

Submission status: Accepted

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

print(len(list(set(info))))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

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

c = collections.Counter(s)

print(len(c))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter

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

c = Counter(s)

print(len(c))

Submission status: Accepted

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

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

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

print(len(s))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = {input()}
for i in range(n-1):
    s.add(input())

print(str(len(s)))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

ss = []

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

ss.sort()

ans = 1

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

print(ans)

Submission status: Accepted

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

from pprint import pprint
from collections import deque, defaultdict
import sys

sys.setrecursionlimit(10 ** 6)
inf = float("inf")

n = int(input())
s = defaultdict(str)
for _ in range(n):
    key = input()
    s[key] = 1

print(len(dict(s)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

n=int(input())
s=[]

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

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

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

print(len(set(s)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
set2=set()
N=int(input())
ans=0
for i in range(N):
  s=input()
  if not s in set2:
    ans+=1
    set2.add(s)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n =int(input())
S = set([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(str(input()))

print(len(s))

Submission status: Accepted

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

newli = list(set(li))
print(len(newli))

Submission status: Accepted

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

print(len(shugo))

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 _ in range(n):
    s.append(input())

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

Submission status: Accepted

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


def log(*args):
    print(*args, file=sys.stderr)


all = set()

N = int(input())
for _ in range(0, N):
    all.add(input())
print(len(all))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

ans = 0
input_list = []
for i in range(n): input_list.append(input())
for i in set(input_list):
    ans += 1
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from collections import Counter

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

Submission status: Accepted

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

print(len(s))