Problem:


Score : 200 points

Problem Statement

An X-layered kagami mochi (X ≥ 1) is a pile of X round mochi (rice cake) stacked vertically where each mochi (except the bottom one) has a smaller diameter than that of the mochi directly below it. For example, if you stack three mochi with diameters of 10, 8 and 6 centimeters from bottom to top in this order, you have a 3-layered kagami mochi; if you put just one mochi, you have a 1-layered kagami mochi.

Lunlun the dachshund has N round mochi, and the diameter of the i-th mochi is d_i centimeters. When we make a kagami mochi using some or all of them, at most how many layers can our kagami mochi have?

Constraints

1 ≤ N ≤ 100

1 ≤ d_i ≤ 100

All input values are integers.

Input

Input is given from Standard Input in the following format:

N
d_1
:
d_N

Output

Print the maximum number of layers in a kagami mochi that can be made.

Sample Input 1

4
10
8
8
6

Sample Output 1

3

If we stack the mochi with diameters of 10, 8 and 6 centimeters from bottom to top in this order, we have a 3-layered kagami mochi, which is the maximum number of layers.

Sample Input 2

3
15
15
15

Sample Output 2

1

When all the mochi have the same diameter, we can only have a 1-layered kagami mochi.

Sample Input 3

7
50
30
50
100
50
80
30

Sample Output 3

4



Sample input:
4
10
8
8
6


Sample output:
3

Submission status: Accepted

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

for i in range(1, n+1):
    a = input()
    a = int(a)
    s.add(a)

print(len(s))

Submission status: Accepted

Solution code:
# coding: utf-8

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

# output
print(len(set(li)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

N = int(input())
d = []
for i in range(1,N+1):
    ele = int(input())
    d.append(ele)


d.sort()
count = 0
pre = 0

for ele in d:
    if ele > pre:
        count += 1
    #print(ele)
    pre = ele

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(0,n):
    f = int(input())
    s.add(f)

print(len(s))

Submission status: Accepted

Solution code:
# coding=utf-8

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

    ans = list(set(d))

    print(len(ans))

Submission status: Accepted

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

N = int(input())
d = [] 

for i in range(N):
    d.append(int(input()))

print(len(list(set(d))))

Submission status: Accepted

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

list_input=[]
list_uniq=[]
for i in range(N):
    a=input()
    a=int(a)
    list_input.append(a)
    
for x in list_input:
    if x not in list_uniq:
        list_uniq.append(x)
        
print(len(list_uniq))

Submission status: Accepted

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

d.sort()
s=set(d)
print(len(s))

Submission status: Accepted

Solution code:
def solve():
    n = int(input())
    d = []
    for _ in range(n):
        d.append(int(input()))

    d_set = set(d)
    print(len(d_set))
solve()

Submission status: Accepted

Solution code:
import math
#A,B,C,D = map(int,input().split())
N = int(input())
d = []
for i in range(N):
    temp = int(input())
    d.append(temp)
d = sorted(d)
d.reverse()

ans = 1
temp = d[0]
for i in range(1,len(d)):
    if d[i] < temp:
        ans += 1
        temp = d[i]

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
d = np.array([int(input()) for i in range(N)])
c = 0
while len(d)>0:
    m = np.max(d)
    d = d[d<m]
    c += 1
print(c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=input()
nlist=[]
for i in xrange(N):
    n=input()
    if n in nlist:
        continue
    else:
        nlist.append(n)
print len(nlist)

Submission status: Accepted

Solution code:
N=int(input())

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

S.sort()

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

print(T)

Submission status: Accepted

Solution code:
N=int(input())
d={}
for i in range(N):
    di=input()
    if not di in d:
        d[di]=0
    else:
        pass
print(len(d))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# スペース区切りの整数の入力
N = int(input())
D = []

for i in range(N):
    d = int(input())
    D.append(d)

length = len(list(set(D)))

print(length)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

N = int(input())
mochi = []

for _ in range(N):
    mochi.append(int(input()))

mochi.sort(reverse=True)

ret = 1
for i in range(len(mochi)-1):
    if mochi[i]>mochi[i+1]:
        ret += 1

print(ret)

Submission status: Accepted

Solution code:
import numpy as np

N = int(input())

arr = np.zeros((N,))

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

print(np.unique(arr).size)

Submission status: Accepted

Solution code:
n = int(input())
d = []
for i in range(n):
  d += [int(input())]
d.sort(reverse=True)

cnt = 1
for i in range(1, n):
  if d[i] < d[i - 1]:
    cnt += 1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
s=set([])

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

print(len(s))

Submission status: Accepted

Solution code:
N = int(input())
d = []
for i in range(N):
    d.append(int(input()))
d.sort()
ans = 0
lastd = 0
for i in d:
    if lastd < i:
        ans += 1
        lastd = i
print(ans)

Submission status: Accepted

Solution code:
amount = int(input())
diameter_list = []
for i in range(amount):
    diameter_list.append(int(input()))
number = 0
checked_list = []
for i in diameter_list:
    if i in checked_list:
        pass
    else:
        checked_list.append(i)
        number = number + 1
print(number)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
dic = [0]*105
for i in range(0,N):
	dic[int(input())]=1
temp = 0
for i in dic:
    temp += i
print(temp)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys,collections
sys.setrecursionlimit(10**7)
def Is(): return [int(x) for x in sys.stdin.readline().split()]
def Ss(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

n = I()
d = []
for i in range(n):
    d.append(I())
s = set(d)
print(len(s))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
y = [int(input()) for i in range(int(input()))]
y = sorted(set(y))
c = 1
max_c = 1
for i,j in enumerate(y):
    try:
        if j < y[i+1]:
            c += 1
            if max_c < c:
                max_c = c
        else:
            c = 1
    except:
        pass
print(max_c)

Submission status: Accepted

Solution code:
num = input()
sets = set()
for i in range(int(num)):
    size = input()
    sets.add(size)
print(len(sets))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from pprint import pprint as pp

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

Submission status: Accepted

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

Submission status: Accepted

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

arr.sort()
answer = 1
for i in range(1, n):
    if(arr[i-1] < arr[i]):
        answer += 1
print(answer)

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(ds)))

Submission status: Accepted

Solution code:
n = int(input())

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

print(len(s))

Submission status: Accepted

Solution code:
a=int(input())
k=[]
for i in range(a):
    k.append(int(input()))
k.sort()
result=1
for i in range(len(k)-1):
    if k[i]<k[i+1]:
        result+=1
print(result)

Submission status: Accepted

Solution code:
max_count = int(input())

length_list = []
for count in range(0, max_count):
    data = int(input())
    if not data in length_list:
        length_list.append(data)

print(len(length_list))

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
d = []
for i in range(n):
    d.append(input())
print(len(set(d)))

Submission status: Accepted

Solution code:
# -- coding: utf-8 --
N = int(input())
a = [input() for i in range(N)]
a_s = set(sorted(a))

print(len(a_s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l = []
for _ in xrange(int(raw_input())):
    l.append(int(raw_input()))
print len(set(l))

Submission status: Accepted

Solution code:
N=int(input())
alist=[]
for i in range(N):
    alist.append(int(input()))
#print(alist)
hh = [0]*101
for i in range(N):
    hh[alist[i]] = max(1,hh[alist[i]])
#print(hh)
ss = sum(hh)
print(ss)

Submission status: Accepted

Solution code:
from collections import Counter

numData = int(raw_input())
radiusData = []
for _ in xrange(numData):
    radiusData.append(int(raw_input()))

counterR = Counter(radiusData)

print len(counterR)

Submission status: Accepted

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

for i in range(n):
    v = int(input())
    if v in d:
        pass
    else:
        d.append(v)

print(len(d))

Submission status: Accepted

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

print(len(d))

Submission status: Accepted

Solution code:
N = int(input())

num = set()

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

print(len(num))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
 
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

N = ni()
li = []

for i in range(N):
  li.append(ni())

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

Submission status: Accepted

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

for count in range(0,N):
    inputList.append(int(input()))

inputList.sort()

count = 1
for i in range(0,N-1):
    if inputList[i] < inputList[i+1]:
        count+=1

print(count)

Submission status: Accepted

Solution code:
N = int(input())
mochi = []
ans = 1

for _ in range(N):
    mochi.append(int(input()))
mochi.sort(reverse=True)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/python

import sys

def main(argv):
    line = sys.stdin.readline()
    while line:
        D = {}
        N = int(line.rstrip("\n"))
        for i in xrange(N):
            d = int(sys.stdin.readline().rstrip("\n"))
            D[d] = 1
        print len(D.keys())

        line = sys.stdin.readline()

if __name__ == "__main__":
    main(sys.argv)

Submission status: Accepted

Solution code:
N = int(input())

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

print(len(set(d)))

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
n = int(input())
d = [ int(input()) for _ in range(n) ]
ans = sorted(list(set(d)))
print(len(ans))

Submission status: Accepted

Solution code:
N = int(input())

radius =[int(input()) for _ in range(N)]
radius.sort()

pile = 0
count = 0

for i in radius:
    if pile < i:
        pile = i
        count += 1

print(count)

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    D = {int(input()) for _ in [0] * N}
    print(len(D))

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
d = []
for i in range(N):
    d.append(int(input()))
ans = 1
d.sort(reverse=True)
for j in range(len(d)-1):
    if d[j] > d[j+1]:
        ans += 1
    else:
        pass
print(ans)

Submission status: Accepted

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

a=set(d)

print(len(a))

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(N):
    d.append(int(input()))


print(len(set(d)))

Submission status: Accepted

Solution code:
N = int(input())
lis = []
for i in range(N):
    lis.append(int(input()))
lis.sort()
c = 1;a = lis[0]
for s in lis:
    if a!=s:
        c +=1
    a = s
print(c)

Submission status: Accepted

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

print(len(set(D)))

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
n = int(input())

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

print(len(set(d)))

Submission status: Accepted

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

print(len(set(b)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    D = [int(input()) for _ in range(N)]

    s = set(D)
    ans = len(s)

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

m = set()
n = int(sys.stdin.readline().strip())
for _ in range(n):
    m.add(int(sys.stdin.readline().strip()))
print(len(m))

Submission status: Accepted

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

ans = 1
for i in range(len(d_l)-1):
    if d_l[i] < d_l[i+1]: ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

a.sort(reverse=True)

ans = 0
tmp = 200

for ai in a:
    if (ai == tmp):
        continue
    tmp = ai
    ans += 1

print(ans)

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    l = []
    for i in range(N):
        l.append(int(input()))
    print(len(set(l)))
if __name__=="__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
d = []
cnt = 0
for i in range(N):
    d.append(int(input()))
for i in range(101):
    if d.count(i) > 0:
        cnt += 1
print(cnt)

Submission status: Accepted

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

d=list(set(d)) # 重複した値は、1つしか使えない
print(len(d))

Submission status: Accepted

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

N = int(input())
mochi = []
for n in range(N):
    mochi.append(int(input()))

print(len(set(mochi)))

Submission status: Accepted

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

Submission status: Accepted

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

def solve():
    L.sort()

    pre = -1
    count = 0
    for l in L:
        if pre != l:
            count += 1
        pre = l

    print(count)


if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
from collections import Counter

n = int(input())
d = [int(input()) for i in range(n)]
cnt = Counter(d)
print(len(cnt))

Submission status: Accepted

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

d = list(set(d))
print(len(d))

Submission status: Accepted

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

Submission status: Accepted

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

import sys

n = int(sys.stdin.readline().strip())
d = []
for _ in range(n):
    d.append(int(sys.stdin.readline().strip()))
print(len(set(d)))

Submission status: Accepted

Solution code:
# encoding:utf-8
import sys

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

if __name__ == '__main__':
	main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

d = [int(sys.stdin.readline().strip()) for i in range(N)]

print(len(set(d)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(len(rec))

Submission status: Accepted

Solution code:
N = int(input())

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

print(len(mochi))

Submission status: Accepted

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

print(len(set(d)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
data = []
for i in range(n):
  v = int(input())
  data += [v]
data = sorted(data)
last = 0
ans = 0
for v in data:
  if v > last:
    last = v
    ans += 1
print(ans)

Submission status: Accepted

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

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**15
mod = 10**9+7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    n = I()
    a = [I() for _ in range(n)]
    t = set(a)

    return len(t)

print(main())

Submission status: Accepted

Solution code:
from collections import Counter

n = int(input())
c = Counter(int(input()) for _ in range(n))
print(len(c))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter
N = int(input())
src = [int(input()) for i in range(N)]
ctr = Counter(src)
print(len(ctr.items()))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
#map(int,input().split())
n=int(input())
d=[]
for i in range(n):
    d.append(int(input()))
print(len(set(d)))

Submission status: Accepted

Solution code:
N = int(raw_input())
A = [int(raw_input()) for _ in xrange(N)]
print len(set(A))

Submission status: Accepted

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

Submission status: Runtime Error

Solution code:
N = int(input())

for i in range(N):
	d = int(input())

dset = set(d)
print(len(dset))

Submission status: Runtime Error

Solution code:
N=int(input())
A=list(map(int,input().split()))
B=A.copy()
counter=0
for num in range(N-2):
  if A[num] in B:
    counter+=1
    while A[num] in B:
      B.remove(A[num])
  
print(counter)

Submission status: Runtime Error

Solution code:
N=int(input())
A=list(map(int,input().split()))
B=A.copy()
counter=0
for num in range(N-1):
  if A[num] in B:
    counter+=1
    while A[num] in B:
      B.remove(A[num])
  
print(counter)

Submission status: Runtime Error

Solution code:
N=int(input())
A=list(map(int,input().split()))
B=A.copy()
counter=0
for num in range(N):
  if A[num] in B:
    counter+=1
    while A[num] in B:
      B.remove(A[num])
  
print(counter)

Submission status: Runtime Error

Solution code:
N=int(input())
A=list(map(int,input().split()))
B=A.copy()
counter=0
for num in range(N):
  if A[num] in B:
    counter+=1
    while A[num] in B:
      B.remove(A[num])
  else:
    continue
print(counter)

Submission status: Runtime Error

Solution code:
N=int(input())
A=list(map(int,input().split()))
B=A.copy()
counter=0
for num in range(N):
  if A[num] in B:
    counter+=1
    while A[num] in B:
      B.remove(A[num])
print(counter)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A=list(map(int,input().split()))
count=0
count_sub=0
while len(A) !=0:
  count+=1
  while count_sub < A.count(A[0]):
    A=A.remove(A[0])
    count_sub+=1
print(count)

Submission status: Runtime Error

Solution code:
A=list(map(int,input().split()))
count=0
while len(A) !=0:
  count+=1
  while count_sub < A.count(A[0]):
    A=A.remove(A[0])
    count_sub+=1
print(count)

Submission status: Runtime Error

Solution code:
n = int(input())

println(
  len(
    set(
      [
        int(input()) for _ in range(n)
      ]
    )
  )
)

Submission status: Runtime Error

Solution code:
mycode = r'''
# distutils: language=c++
# cython: language_level=3
# cython: boundscheck=False
# cython: wraparound=False
# cython: infer_types=True
# cython: cdivision=True
# False:Cython はCの型に対する除算・剰余演算子に関する仕様を、(被演算子間の符号が異なる場合の振る舞いが異なる)Pythonのintの仕様に合わせ、除算する数が0の場合にZeroDivisionErrorを送出します。この処理を行わせると、速度に 35% ぐらいのペナルティが生じます。 True:チェックを行いません。

import numpy as np

# 読み込みはpython側で行う
import sys
readline = sys.stdin.buffer.readline
read = sys.stdin.readline #文字列読み込む時はこっち

cdef LL a_int(): return int(readline())

def ints(): return np.fromstring(readline(), sep=' ', dtype=np.int64)

cdef read_matrix(LL H,LL W):
    #return np.ndarray shape=(H,W) matrix
    lines=[]
    cdef LL _
    for _ in range(H): 
        lines.append(read())
    lines=' '.join(lines) #byte同士の結合ができないのでreadlineでなくreadで
    return np.fromstring(lines, sep=' ',dtype=np.int64).reshape(H,W)


N=a_int()
D=read_matrix(N,1)[:,0]
print(len(np.unique(D)))

'''

import sys
if sys.argv[-1] == 'ONLINE_JUDGE':  # コンパイル時
    import os
    with open('mycode.pyx', 'w') as f:
        f.write(mycode)
    os.system('cythonize -i -3 -b mycode.pyx')

import mycode

Submission status: Runtime Error

Solution code:
n=int(input())
d=list(int(input()) for i in range(n))
cnt=0
st=100
l=[]
for i in range(n):
    if d<st:
        cnt += 1
        st = d
    else:
        l.append(cnt)
        st = 100
        cnt = 0
l.sort()
print(l[len(l)-1])

Submission status: Runtime Error

Solution code:
n=int(input())
d=list(int(input()) for i in range(n))
cnt=0
st=100
l=[]
for i in range(n):
    if d<st:
        cnt += 1
        st = d
    else:
        l.append(cnt)
        st = 100
print(max(l))

Submission status: Runtime Error

Solution code:
N = int(input())

List = sorted(list(set(list(int(input()) for i in range(N)))))

print(len(List()))

Submission status: Runtime Error

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

print(len(set(d)))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
D = [int(input()) for _ in range(N)]
 
l = [0]*100
for i in range(N):
  l[d[i]-1] = 1
  
print(sum(l))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
List=[int(input()) for i in range(n)]
ans = 0
while True
for i,j in range(n):
  if i == j:
    ans +=1
print(n-ans)

Submission status: Runtime Error

Solution code:
N = int(input())
D = sorted([int(input()) for _ in range(N)])
if len(D) == 1: print(1)
i,prev = 1,D[0]
while i != (len(D)-1):
    if D[i] == prev: 
        D.pop(i)
    else:
        i +=1
        prev = D[i]
print(len(D))

Submission status: Runtime Error

Solution code:
N = int(input())
D = sorted([int(input()) for _ in range(N)])
i,prev = 1,D[0]
while i != (len(D)-1):
    if D[i] == prev: 
        D.pop(i)
    else:
        i +=1
        prev = D[i]
print(len(D))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
d = lisat(int(input()) for _ in range(N))
print(len(set(sortd(d))))

Submission status: Runtime Error

Solution code:
N = int(input())
d = list(map(int, input().split()))

x = sorted(d, reverse=True)

ans = 1
for i in range(N-1):
    if x[i] - x[i+1] >0:
        ans += 1
    else:
        continue


print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())

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

print(min(3,len(s)))

Submission status: Runtime Error

Solution code:
n = int(input())
 
m = {}
 
for i in range(n):
  x = int(input())
  m.add(x)
  
print(len(m))

Submission status: Runtime Error

Solution code:
n = int(input())

m = {}

for i in n:
  x = int(input())
  m.add(x)
  
print(len(m))

Submission status: Runtime Error

Solution code:
N=int(input())
A=[input() for i in range(N)]
B=[]
while len(A)!=0:
  if A[0] not in B:
    B.append(A[0])
  A.popleft()
print(len(B))

Submission status: Runtime Error

Solution code:
N=int(input())
A=[input() i in range(N)]
B=[]
while len(A)!=0:
  if A[0] not in B:
    B.append(A[0])
  A.popleft()
print(len(B))

Submission status: Runtime Error

Solution code:
N  = int(input())
num = list(map(int, input().split()))
num.sort()
count = 1

for i in range(N-1):
    if not num[i] == num[i+1]:
        count += 1
print(count)

Submission status: Runtime Error

Solution code:
N = int(input())
mochi = []
for i in range(N):
  a = int(input())
  if not a in mochi:
    mochi.append(a)
    
mochi.sorted()
print(len(mochi))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
Row = int(input())
List = []
for i in range (Row):
  List.append(list(map(int, input().split())))
s_l = set(List)
print(len(s_l))

Submission status: Runtime Error

Solution code:
n = int(input())
d = [0] * 100
for i in range(0, n):
    inp = int(input())
    d[inp] += 1

count = 0
for i in d:
    if i > 0:
        count += 1
print(count)

Submission status: Runtime Error

Solution code:
n=int(input)
for i in range(n):
  keep.append(int(input()))

print(len(set(keep)))

Submission status: Runtime Error

Solution code:
N = int(input())
d = list((int(input()) for _ in range(N)))
import pandas as pd
print(len(pd.DataFrame(d)[0].value_counts()))

Submission status: Runtime Error

Solution code:
N = int(input())
list_a = [int(input()) for i in range(N)]
s = []
for i in list_a:
    if s.count(i) == 0
        s.append(i)
print(len(s))

Submission status: Runtime Error

Solution code:
N = int(input())
d = list(map(int, input().split()))

ans = 1
e = sorted(d,reverse = True)
for i in range(0,N):
	if i != 0:
		if e[i]<e[i-1]:
			ans += 1

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
d = list([int(input()) for i in range(N)])
print(d.count())

Submission status: Runtime Error

Solution code:
n, y = map(int, input().split())
for i in range(n + 1):
    for j in range(n - i + 1):
        if i * 10000 + j * 5000 + (n - i - j) * 1000 == y:
            print(i, j, n - i - j)
            exit()
print("-1 -1 -1")

Submission status: Runtime Error

Solution code:
n, sum = map(int, input().split())

for x in range(n + 1):
    for y in range(n - x + 1):
        if x * 10000 + y * 5000 + (n-x-y) * 1000 == sum:
            print(f'{x} {y} {n-x-y}')
            exit()

print('-1 -1 -1')