Problem:


Score : 300 points

Problem Statement

You drew lottery N times. In the i-th draw, you got an item of the kind represented by a string S_i.

How many kinds of items did you get?

Constraints

1 \leq N \leq 2\times 10^5

S_i consists of lowercase English letters and has a length between 1 and 10 (inclusive).

Input

Input is given from Standard Input in the following format:

N
S_1
:
S_N

Output

Print the number of kinds of items you got.

Sample Input 1

3
apple
orange
apple

Sample Output 1

2

You got two kinds of items: apple and orange.

Sample Input 2

5
grape
grape
grape
grape
grape

Sample Output 2

1

Sample Input 3

4
aaaa
a
aaa
aa

Sample Output 3

4



Sample input:
3
apple
orange
apple


Sample output:
2

Submission status: Accepted

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

# import numpy as np
# from itertools import *
# from collections import *

# S = input().split()
N = int(input())
# K, N = [int(x) for x in input().split()]

li = []

for n in range(N):
    li.append(input())

print(len(set(li)))

Submission status: Accepted

Solution code:
# coding:utf-8

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main(n: int, s: list):
    print(len(set(s)))


if __name__ == "__main__":
    n = int(input())
    s = [input() for _ in range(n)]

    main(n, s)

Submission status: Accepted

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

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

print(len(s))

Submission status: Accepted

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

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:
def s0():return input()
def s1():return input().split()
def s2(n):return [input() for x in range(n)]
def s3(n):return [[input().split()] for _ in range(n)]
def n0():return int(input())
def n1():return [int(x) for x in input().split()]
def n2(n):return [int(input()) for _ in range(n)]
def n3(n):return [[int(x) for x in input().split()] for _ in range(n)]

n=n0()
s=s2(n)
from collections import Counter
c=Counter(s)
print(len(c))

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

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(S)))

Submission status: Accepted

Solution code:
n = int(input())
s = [""]* n

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(s)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

A = set()
ans = 0

for i in range(N):
  x = input()
  if (x not in A):
    ans += 1
    A.add(x)

print(ans)

Submission status: Accepted

Solution code:
dic = {}

n = int(input())

for i in range(n):
    s = input()
    if dic.get(s, None) is None:
        dic[s] = 1

print(len(dic))

Submission status: Accepted

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

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

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:
# Template 1.0
import sys, re
from collections import deque, defaultdict, Counter, OrderedDict
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from heapq import heappush, heappop, heapify, nlargest, nsmallest
def STR(): return list(input())
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def list2d(a, b, c): return [[c] * b for i in range(a)]
def sortListWithIndex(listOfTuples, idx):   return (sorted(listOfTuples, key=lambda x: x[idx]))
def sortDictWithVal(passedDic):
    temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))
    toret = {}
    for tup in temp:
        toret[tup[0]] = tup[1]
    return toret
def sortDictWithKey(passedDic):
    return dict(OrderedDict(sorted(passedDic.items())))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

n = INT()
set1 = set()
while (n != 0):

    set1.add(input())


    n-=1
print(len(set1))

Submission status: Accepted

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

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:
if __name__ == '__main__':
    #s = input().rstrip().split(' ')
    N = int(input())
    S = set()
    for _ in range(N):
        S.add(str(input()))

    print(len(S))

Submission status: Accepted

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

def main():
    N = int(readline())
    S = [readline().strip() for _ in range(N)]

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


if __name__ == "__main__":
    main()

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:

import sys


def answer(N,S):
    return len(set(S))

def main():
    N = int(input())
    S = [(input()) for _ in range(N)]
    # answer()
    print(answer(N,S))

if __name__ == '__main__':
   main()

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())
s=[input() for i in [0]*n]
print(len(set(s)))

Submission status: Accepted

Solution code:
from sys import stdin
# import sys

# A, B, C = [int(x) for x in stdin.readline().rstrip().split()]
# N = [int(x) for x in stdin.readline().rstrip().split()]
N = int(input())
# U = input().split()
# A, B = [str(x) for x in stdin.readline().rstrip().split()]

d = {}
for i in range(N):
    s = input()
    d[s] = d.get(s, 0)+1
print(len(d))

Submission status: Accepted

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

print(len(s.keys()))

Submission status: Accepted

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

#n = int(input())
#l = list(map(int, input().split()))
'''
A=[]
B=[]
for i in range():
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)'''
import collections

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

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

Submission status: Accepted

Solution code:
n=int(input())
s=[""]*n
List={}
for i in range(n):
    s[i]=input()
    if not s[i] in List:
        List[s[i]]=1
    else:
        List[s[i]]+=1
print(len(List))

Submission status: Accepted

Solution code:

n = int(input())
items = set()

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

print(len(items))

Submission status: Accepted

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

print(len(set(strings)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
n = int(input())
s = {input().strip() for _ in range(n)}
print(len(s))

Submission status: Accepted

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

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

print(len(slist))

Submission status: Accepted

Solution code:
import math
from collections import defaultdict
ml=lambda:map(int,input().split())
ll=lambda:list(map(int,input().split()))
ii=lambda:int(input())
ip=lambda:(input())

"""========main code==============="""

t=ii()
s=set()
for _ in range(t):
    n=ip()
    s.add(n)
print(len(s))

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:
# coding: utf-8
N = int(input())
S = [input() for i in range(N)]
print(len(set(S)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

N = int(readline())
l = {readline().decode().rstrip() for _ in range(N)}


print(len(l))

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())

keihinList=set()

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

print(len(keihinList) )

Submission status: Accepted

Solution code:
import collections
#,W = map(int,input().split())
N = int(input())
#K = int(input())
#A = list(map(int,input().split()))
S=[]
for i in range(N):
    s=str(input())
    S.append(s)
l=collections.Counter(S)
print(len(l))

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-
n = int(input())

dict_s = {}
for i in range(0, n):
    s = input()
    dict_s[s] = 1
print(len(dict_s))

Submission status: Accepted

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

print(len(ans))

Submission status: Accepted

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

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

print(len(S))

Submission status: Accepted

Solution code:
se = set()

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

print(len(se))

Submission status: Accepted

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

print(len(set(S)))

Submission status: Accepted

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

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

     ans = set()

     for i in range(n):
          target = input()
          ans.add(target)
     
     print(len(ans))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import collections

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

T = collections.Counter(S)

print(len(T))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)

def LI(): return list(map(int, stdin.readline().split()))
def LS(): return list(stdin.readline())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


def main():
    N = int(readline())
    d = defaultdict(int)
    for _ in range(N):
        s = input()
        d[s] += 1
    print(len(d.values()))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.buffer.readline
#from collections import defaultdict
#d = defaultdict(int)
#import fractions
#import math
#import collections
#from collections import deque
#from bisect import bisect_left
#N = int(input())
#A = list(map(int,input().split()))
#S = list(input())
#S.remove("\n")
#N,M = map(int,input().split())
#S,T = map(str,input().split())
#A = [int(input()) for _ in range(N)]
#S = [input() for _ in range(N)]
#A = [list(map(int,input().split())) for _ in range(N)]
#import itertools
N = int(input())
dic = {}
c = 0
for _ in range(N):
    s = input()
    if s not in dic.keys():
        dic[s] = 1
        c += 1
print(c)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(len(Goods))

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

Submission status: Accepted

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

import sys
from collections import Counter

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

N = INT()

C = Counter()
for _ in range(N):
    C[input()] += 1
ans = len(C)
print(ans)

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

Submission status: Accepted

Solution code:

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

if __name__ == '__main__':
    main()

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:
def c164(n, sl):

    ans = len(set(sl))

    return ans

def main():
    n = int(input())
    sl = [str(input()) for i in range(n)]
    print(c164(n, sl))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

print(len(d))

Submission status: Accepted

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

print(len(S))

Submission status: Accepted

Solution code:
#


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


def solve(S):
    se = set(S)
    ans = len(se)
    
    return ans
print(solve(S))

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

print(len(ans))

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
n = int(input())
S = []
for i in range(n):
    S.append(input())

print(len(set(S)))

Submission status: Accepted

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

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:
# coding: utf-8
# Your code here!
import sys
readline = sys.stdin.readline
read = sys.stdin.read

n = input()

s = set(read().split())
print(len(s))

Submission status: Accepted

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

print(len(A))

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:
def calc(N, S):
    return len(set(S))



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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
n = int(input())

d = {}
ans = 0
for i in range(n):
  s = input()
  if s not in d.keys():
    ans += 1
    d[s] = 0
print(ans)

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:
import collections
import sys
import numpy as np
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
MOD = 10**9+7
import itertools
import math

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import queue
import copy
import math
from collections import deque
import bisect

# そのまま入力文字列の入力
n = int(input())
ss = []
for i in range(0, n):
    ss.append(input())

sss = set(ss)

print(len(sss))

Submission status: Accepted

Solution code:
N = [int(n) for n in input().split()][0]

S = set(input() for _ in range(N))
print(len(S))

Submission status: Accepted

Solution code:
import sys
import math
import queue
import copy
import bisect#2分探索
from collections import deque #popleft(), appendleft(x)
##listでqueの代用をするとO(N)の計算量がかかってしまうので注意

def input(): return sys.stdin.readline()[:-1]
def printl(li): print(*li, sep="\n")
def argsort(s): return sorted(range(len(s)), key=lambda k: s[k])

#mod = 10**9+7

N = int(input())
#N, K = map(int, input().split())
#L = [int(input()) for i in range(N)]
#A = list(map(int, input().split()))
#S = [inputl() for i in range(H)]
#q = queue.Queue() #q.put(i) #q.get() 
#q = queue.LifoQueue() #q.put(i) #q.get() 

#a= [[0]*3 for i in range(5)] #2次元配列はこう準備、[[0]*3]*5だとだめ
#b=copy.deepcopy(a)  #2次元配列はこうコピーする
#w.sort(key=lambda x:x[1],reverse=True)  #二個目の要素で降順並び替え

#素数リスト
# n = 100
# primes = set(range(2, n+1))
# for i in range(2, int(n**0.5+1)):
#     primes.difference_update(range(i*2, n+1, i))
# primes=list(primes)

#bisect.bisect_left(a, 4)#aはソート済みである必要あり。aの中から4未満の位置を返す。rightだと以下
#bisect.insort_left(a, 4)#挿入
a=set()
for i in range(N):
    s=input()
    a.add(s)
print(len(a))

Submission status: Accepted

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

used = {}
count = 0

for s in s_list:
    if s not in used:
        used[s] = True
        count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

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


a = collections.Counter(s)

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

print(len(a))

Submission status: Accepted

Solution code:
N=int(input())
dic={}
for _ in range(N):
  a=input()
  if (a in dic):
    continue
  else:
    dic[a]=1
b=0
for value in dic.values():
  b+=1
print(b)

Submission status: Accepted

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

MOD = 10**9
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    return divisors

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

print(len(set(l)))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
k = [[]]*n
for N in range(n):
  k[N] = str(input())
print(len(set(k)))

Submission status: Accepted

Solution code:
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

N = int(input())

S = set()

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

print(len(S))

Submission status: Accepted

Solution code:
n = int(input())

hash = {}
for i in range(n):
    s = str(input())
    if not (s in hash):
        hash[s] = True

print(len(hash))

Submission status: Accepted

Solution code:
n = int(input())

se = set()

for _ in range(n):
    se.add(input())

print(len(se))

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

Submission status: Accepted

Solution code:
# /usr/bin/python3
# -*- coding: utf-8 -*-
from queue import Queue
from queue import LifoQueue as Stack
from math import sqrt, floor, ceil, log2, log10, pi
from fractions import gcd
from itertools import permutations, combinations
from operator import itemgetter
from functools import cmp_to_key


INF=1001001001
__MOD__=(10**9)+7
yn = 'YNeos'
judge = False
cnt = 0
ans = None


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

def intinput():
    return int(input())

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

def lineinputs(func=intinput):
    datas = []
    while True:
        try:
            datas.append(func())
        except EOFError:
            break
    return datas

class ModInt():
    def __init__(self, x):
        self.__x = (x % __MOD__)
    def __add__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x + other.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x + other.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __radd__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((other.__x + self.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((other.__x + self.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")

    def __sub__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x - other.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x - other.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __rsub__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((other.__x - self.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((other.__x - self.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")

    def __mul__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x * other.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x * other.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __rmul__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((other.__x * self.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((other.__x * self.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")

    def __truediv__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x * other.__modinv())%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x * other.__modinv())%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __rtruediv__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((other.__x * self.__modinv())%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((other.__x * self.__modinv())%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")

    def __pow__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__(pow(self.__x, other.__x, __MOD__)))
        elif type(other) == ModInt:
            return self.__class__(pow(self.__x, other.__x, __MOD__))
        else:
            raise Exception("Not Int or Not ModInt")
    def __rpow__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__(pow(other.__x, self.__x, __MOD__)))
        elif type(other) == ModInt:
            return self.__class__(pow(other.__x, self.__x, __MOD__))
        else:
            raise Exception("Not Int or Not ModInt")

    def __modinv(self, m=__MOD__):
        a = self.__x
        if a == 0:
            raise ZeroDivisionError()
        if gcd(a, m) != 1:
            raise Exception("%sの逆数は求まりません。" % a)
        b, u, v = m, 1, 0
        while b != 0:
            t = a//b;
            a -= t*b
            a, b = b, a
            u -= t * v
            u, v = v, u
        u %= m
        if u < 0:
            u += m
        return u
    def __int__(self):
        return self.__x
    def __str__(self):
        return str(self.__x)



if __name__ == '__main__':
    N = intinput()
    datas = set()
    for _ in range(N):
        datas.add(input().strip())

    # 出力
    print(len(datas))

Submission status: Accepted

Solution code:
import collections
def main():
    n = int(input())
    s = []
    for _ in range(n):
        ss = input()
        s.append(ss)
    ans = len(set(s))
    print(ans)
    # print(s)
if __name__=='__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import fractions
import collections
import itertools
d=collections.deque()
N=int(input())
goods=[input() for _ in range(N)]
print(len(set(goods)))

Submission status: Accepted

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

shu = set(s)
print(len(shu))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
N = int(input().strip())
S = [input().strip() for _ in range(N)]

print(len(set(S)))

Submission status: Accepted

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