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 = int(input())
d = [int(input()) for i in range(n)]
bucket = [0]*101
ret = 0

for i in range(n):
 bucket[d[i]] += 1
for i in range(101):
 if bucket[i]>0: ret += 1

print(ret)

Submission status: Accepted

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

duplication = 0
for i in range(n-1):
 if d[i] == d[i+1]: duplication += 1

print(n-duplication)

Submission status: Accepted

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

print(len(d))

Submission status: Accepted

Solution code:
N = int(input())
count = 0
check = []
for i in range(N):
  work = int(input())
  if work not in check:
    count +=1
    check.append(work)
print(count)

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

d.sort()

count = 1

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

print(count)

Submission status: Accepted

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

# AtCoder Beginner Contest
# Problem B

if __name__ == '__main__':
    mochi_count = int(input())
    mochi_diameters = [int(input()) for _ in range(mochi_count)]

    step_count = len(set(mochi_diameters))
    print(step_count)

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 = [int(input()) for i in range(N)]
d.sort(reverse=True)
mochi = d[0]
dan = 1
for i in range(1,N):
    if d[i] < mochi:
        mochi = d[i]
        dan += 1
print(dan)

Submission status: Accepted

Solution code:
n=int(input())
x=[]
count=0
for i in range(n):
    x.append(int(input()))
x=set(x)
for i in x:
    count +=1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

Solution code:
#coding:utf-8
n = int(input())
d = []
for i in range(n):
    d.append(int(input()))
d.sort()

dm = 0
count = 1
for i in range(1, n):
    dm = d[i]-d[i-1]
    if dm > 0:
        count += 1
print(count)

Submission status: Accepted

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

for i in range(n):
	b=0
	b=int(input())
	a.append(b)

a=sorted(a)
c=0
for j in range(n-1):
	if((a[j])<(a[j+1])):
		c+=1

print(c+1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
N = int(input())
d = set() #空のset型を作成する
for i in range(N):
    d.add(input()) #set型にデータを追加する。但し、同じデータを代入しようとしても、はじかれる。
print(len(d))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
l=[]
for _ in range(N):
    l.append(int(input()))
L=set(l)
LL=sorted(L,reverse=True)
cnt=1
for i in range(len(LL)-1):
    if LL[i]<=LL[i+1]:
        break
    cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
def kagamimochi(diameters):
    return len(list(set(diameters)))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N = int(input().strip())
    mochi = []
    for _ in range(N):
        mochi.append(int(input().strip()))
    return len(set(mochi))

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

Submission status: Accepted

Solution code:
N = int(input())
List = [0]
count = 1
for i in range(N):
    List.append(int(input()))
List.pop(0)
List.sort()
i = 1
for j in range(N - 1):
    if List[i] != List[i - 1]: count += 1
    i += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
list_mochi = []
for i in range(N):
    r = int(input())
    if not(r in list_mochi):
        list_mochi += [r]

print(len(list_mochi))

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(n):
    if not d[i] in ans:
        ans.append(d[i])
print(len(ans))

Submission status: Accepted

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

import sys

def main():
    _ = sys.stdin.readline()
    print(len(set(map(int, sys.stdin.readlines()))))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
items = [int(input()) for i in range(n)]
uniq = list(set(items))
print(len(uniq))

Submission status: Accepted

Solution code:
n = int(input())
a = []
for i in range(0, n):
    a.append(int(input()))
a.sort(reverse=True)
temp = 101
ans = 0
for i in a:
    if temp > i:
        ans += 1
        temp = i
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

answer_set = set(d)

print(len(answer_set))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

import sys

n = int(raw_input().split()[0])
ts = set()
for _ in xrange(0, n):
    di = raw_input().split()[0]
    ts.add(di)
ans = len(ts)
sys.stdout.write('%s\n' % (ans))
sys.stdout.flush()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
Dia = [0]*N
for i in range(N):
    Dia[i] = int(input())
count = [0]*100
for i in Dia:
    count[i-1] += 1
print(100-count.count(0))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
https://beta.atcoder.jp/contests/abc085/tasks/abc085_b

"""
import sys
from sys import stdin
input = stdin.readline


def solve(mochi):
    availables = [False] * 101
    for m in mochi:
        availables[m] = True
    return availables.count(True)


def main(args):
    mochi = []
    N = int(input())
    for _ in range(N):
        mochi.append(int(input()))
    ans = solve(mochi)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

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:
# -*- coding: utf-8 -*-

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

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

last_mochi = 101
count = 0

for mochi in sorted(mochi_list, reverse=True):
    if mochi < last_mochi:
        count += 1
    last_mochi = mochi

print(count)

Submission status: Accepted

Solution code:
N = int(input())

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

cnt = 0
for i in a:
    if i in b:
        pass
    else:
        b.append(i)
print(len(b))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

#print(n)                                                                                                     
#print(d[:])                                                                                                  

ans=n
for i in range(n):
    flag=0
    for j in range(n-i-1):
        if(d[i]==d[i+j+1]):
            flag=flag+1
    if(flag!=0):
        ans=ans-1
#    print('j=',j)                                                                                            
#    print(flag)                                                                                              
#    print(ans)                                                                                               

print(ans)

Submission status: Accepted

Solution code:
#coding : utf-8

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

Submission status: Accepted

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

Submission status: Accepted

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

Moti = list()
for k in d:
   if (k in Moti) == False:
      Moti.append(k)

print(len(Moti))

Submission status: Accepted

Solution code:
def RemoveDuplicates(x):
    y = []
    for i in x:
        if i not in y:
            y.append(i)
    return y

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

print(len(RemoveDuplicates(a)))

Submission status: Accepted

Solution code:
#枚数
paper = int(input())

#餅リスト
moti_list  = []
li_uniq    = []

#取得
for w in range(paper):
    paper = int(input())

    moti_list.append(paper)

li_uniq = list(set(moti_list))

print(len(li_uniq))

Submission status: Accepted

Solution code:
# coding: utf_8
""" abc085b """

n = int(input())
mochiSet = set()
[mochiSet.add(int(input())) for i in range(n)]
print(len(mochiSet))

Submission status: Accepted

Solution code:
N = int(input())
ipts = [input() for i in range(N)]
dic = {}
for i in ipts:
    if(i not in dic):
        dic[i] =  True
print(len(dic))

Submission status: Accepted

Solution code:
import math
import numpy as np
from operator import mul

# 整数Nを桁ごとのリストにする
# l = [int(x) for x in list(str(N))]

# リストliから重複を削除したリストli_uniqを作成
#li_uniq = []
#for i in li:
#    if x not in li_uniq:
#        li_uniq.append(x)

N = int(input())
D = [int(input()) for i in range(N)]
D_uniq = []
for x in D:
    if x not in D_uniq:
        D_uniq.append(x)

print(len(D_uniq))

Submission status: Accepted

Solution code:
n = int(input())
d = [int(input()) for i in range(n)]
d = list(sorted(d))
ret = 0
tmp = 0
for i in d:
    if tmp < i:
        tmp = i
        ret +=1
print(ret)

Submission status: Accepted

Solution code:
N = int(input())
d = list()
for i in range(0,N):
    e = int(input())
    d.append(e)

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

Submission status: Accepted

Solution code:
N = int(input())
i=0
L=[]
while i < N:
    L.append(int(input()))
    i+=1
Luni = list(set(L))
print(len(Luni))

Submission status: Accepted

Solution code:

from bisect import bisect_left, bisect_right, insort_left, insort_right

import numpy as np

import itertools

import math 
from collections import defaultdict as dd
def main():
    n = int(input())
    A = []
    for k in range(n):
        A.append(int(input()))

    A =  sorted(A)

    count = 0
    val = 0
    for a in A:
        if a > val:
            count += 1
            val = a

    print (count)

if __name__ == "__main__":
    # global stime
    # stime = time.clock()
    main()

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:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

N = int(input())
childs = [list(map(int, input().split())) for _ in range(N)]

childs.sort(reverse=True)
count = 0
pre_c = 0
for c in childs:
    if not pre_c == c:
        count += 1
    pre_c = c
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

import numpy as np
b=np.unique(a)
print(len(b))

Submission status: Accepted

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

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

uniqueList = []
for i in range(N):
    if d[i] in uniqueList:
        continue
    else:
        uniqueList.append(d[i])
        
print(len(uniqueList))

Submission status: Accepted

Solution code:

n = int(input())
xs = {int(input()) for i in range(n)}
print(len(xs))

Submission status: Accepted

Solution code:
n = int(input())
list = []
i = 0
for k in range(n):
    d = int(input())
    if d in list:
        pass
    else:
        list.append(d)
print(len(list))

Submission status: Accepted

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

Submission status: Accepted

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

for v in range(n):
    num = int(input())
    li.append(num)

ans = []

for i in li:
    if i not in ans:
        ans.append(i)       

print(len(ans))

Submission status: Accepted

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

a.sort()
a.reverse()

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

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:
inn = int(input())
sizes = set()
for i in range(inn):
    sizes.add(int(input()))
ans = len(sizes)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# ABC085 B - Kagami Mochi

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

Submission status: Accepted

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

Submission status: Accepted

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

count = 0
while len(d) != 0:
    mini = min(d)
    while mini in d:
        d.remove(mini)
    count += 1

print(count)

Submission status: Accepted

Solution code:
def solve():
    n = int(input())
    mochi_size_list = []
    for i in range(n):
        d_i = int(input())
        if d_i not in mochi_size_list:
            mochi_size_list.append(d_i)
    print(len(mochi_size_list))

solve()

Submission status: Accepted

Solution code:
print(len({input() for x in [0]*int(input())}))

Submission status: Accepted

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

Submission status: Accepted

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

n = raw_input()
n = int(n)
d = []
ans = 0
for i in range(n):
    nyu = raw_input()
    if not nyu in d:
        ans += 1
    d.append(nyu)
print ans

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = int(input())

mochis = []
for i in range(num):
    size = int(input())
    if size not in mochis:
        mochis.append(size)

print(len(mochis))

Submission status: Accepted

Solution code:
def main():
	n_set = set([int(input()) for _ in range(int(input()))])
	print(len(n_set))
	
if __name__ == '__main__':
	main()

Submission status: Accepted

Solution code:
import numpy as np
import pdb

def main():
    N = int(raw_input())
    dslist = []
    for k in range(N):
        kthvalue = int(raw_input())
        dslist += [kthvalue]
    dslist = np.array(dslist)
    print tallestKagami(dslist)

def tallestKagami(ds):
    N = len(ds)
    ds = np.sort(ds)[::-1]
    stacksize = 0
    while(len(ds) > 0):
        largest = ds[0]
        ds = np.delete(ds, np.where(ds == largest)[0])
        stacksize += 1

    return stacksize


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

print(len(set(d)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
s_ls = sys.stdin.read().split("\n")[1:]
if "" in s_ls:
    s_ls.remove("")
s_ls = sorted(list(map(int, set(s_ls))))
print(len(s_ls))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
'''
X 段重ねの鏡餅 (X≥1) とは、X 枚の円形の餅を縦に積み重ねたものであって、
どの餅もその真下の餅より直径が小さい（一番下の餅を除く）もののことです。
例えば、直径 10、8、6 センチメートルの餅をこの順に下から積み重ねると 3 段重ねの鏡餅になり、
餅を一枚だけ置くと 1 段重ねの鏡餅になります。

ダックスフンドのルンルンは N 枚の円形の餅を持っていて、
そのうち i 枚目の餅の直径は di センチメートルです。
これらの餅のうち一部または全部を使って鏡餅を作るとき、
最大で何段重ねの鏡餅を作ることができるでしょうか。
'''

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

# print(num,diameter_list)
diameter_list.sort(reverse = True)
# print(diameter_list)

a = []
for i in diameter_list:
    if (i not in a):
        a.append(i)

print(len(a))

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(d)))

Submission status: Accepted

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

print(len(set(a)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:utf-8

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

for i in range(n):
    K.append(input())
    
k = []
for x in K:
    if x not in k:
        k.append(x)

print(len(k))

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

d = []

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

d.sort()

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

print(count)

Submission status: Accepted

Solution code:
x=[0]*105
N=input()
for i in range(int(N)):
    x[int(input())]=1
print(sum(x))

Submission status: Accepted

Solution code:
N = int(input())
d = [int(input()) for i in range(N)]
sum = 0
maxd = 1
while maxd>0:
    maxd = max(d)
    for j in range(N):
        if maxd == d[j]:
            d[j] = 0
    sum += 1
print(sum-1)

Submission status: Accepted

Solution code:
import sys
input(), print(len(set(sys.stdin.read().strip().split())))

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())
moti = []
for n in range(N):
    moti.append(int(input()))
counter = 0

while True:
    max_moti = max(moti)
    number_moti = moti.count(max_moti) #最大モチの数
    
    for i in range(number_moti): 
        index = moti.index(max_moti)
        del moti[index]
    counter += 1
    if not moti:
        break

print(counter)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = int(input())
arr = [int(input()) for i in range(num)]
sorted_arr = []
for x in arr:
    if x not in sorted_arr:
        sorted_arr.append(x)
print(len(sorted_arr))

Submission status: Accepted

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

print(len(S))

Submission status: Accepted

Solution code:
n = int(input())

c = set()

for _ in range(n):
    d = int(input())
    if d in c:
        continue
    c.add(d)

print(len(c))

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 = []
ans = 1
for i in range(n):
    d.append(int(input()))
d.sort()
d.reverse()
tmp = d[0]
for i in d:
    if tmp > i:
        ans += 1
    tmp = i
print(ans)

Submission status: Accepted

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

print(len(s))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
N = int(input())
d = [0] * N
for i in range(N):
    d[i] = int(input())

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

Submission status: Accepted

Solution code:
count = int(input())

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

min = l[0]
ans = 1
for elem in l:
    if min < elem:
        ans += 1
        min = elem
print(ans)

Submission status: Accepted

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

ans=set(a)

print(len(ans))

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt, floor
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache, reduce
from operator import xor
from heapq import heappush, heappop
INF = float("inf")
sys.setrecursionlimit(10**7)

# 4近傍（右, 下, 左, 上）
dy4, dx4 = [0, -1, 0, 1], [1, 0, -1, 0]


def inside(y: int, x: int, H: int, W: int) -> bool: return 0 <= y < H and 0 <= x < W
def ceil(a, b):return (a + b - 1) // b


def solve(N, d_list):
    ans = 0
    now = INF
    for d in sorted(d_list, reverse=True):
        if now > d:
            now = d
            ans += 1
    return ans


def main():
    N = int(input())
    d_list = [int(input()) for _ in range(N)]
    print(solve(N, d_list))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

Ans = set()

for i in range(N):
	Ans.add(int(input()))
	
print(len(Ans))

Submission status: Accepted

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

res = set()
for i in range(N):
	res.add(d[i])

print(len(res))

Submission status: Accepted

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

import sys

d = list(map(lambda x: int(x.strip()), sys.stdin.readlines()))
print(len(set(d[1:])))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = int(input())


array = []
for i in range(num):
    array.append(int(input()))
sort = reversed(sorted(array))

res = 0
tmp = float("inf")

for i in sort:
    if i < tmp:
        res += 1
        tmp = i
print(res)

Submission status: Accepted

Solution code:
#abc085

n=int(raw_input())
d=[]
for  i in xrange(n):
 d.append(int(raw_input()))
s=set(d)
print len(s)

Submission status: Accepted

Solution code:
T=int(input())
a=[]
for i in range(T):
	b=int(input())
	if b not in a:
		a.append(b)
	else:
		pass
a.sort(reverse=True)
print(len(a))

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:
if __name__ == '__main__':
    N = int(input())
    d = [int(input()) for _ in range(N)]
    ans = len(set(d))
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(len(d))

Submission status: Accepted

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

import array
from bisect import *
from collections import *
import fractions
import heapq 
from itertools import *
import math
import random
import re
import string

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

Submission status: Accepted

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

Submission status: Accepted

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

size = 0
max = 9999999999

for m in mochi:
    # print(m)
    if m < max:
        size += 1
        max = m
# 出力
print(size)

Submission status: Accepted

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

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

array = []

for i in range(N):
    num = int(raw_input())
    array.append(num)

array.sort()

d = 1
pre_r = array.pop(0)

while len(array) > 0:
    tmp_r = array.pop(0)
    if pre_r < tmp_r:
        d = d +1
        pre_r = tmp_r

print d

Submission status: Accepted

Solution code:
N = input('')
d = []
temp = input('')
d.append(temp)
for i in range(1, N):
    flag = 0
    temp = input('')
    for j in range(0, len(d)):
        if temp == d[j]:
            flag = 1
    if flag == 0:
        d.append(temp)
        #print('append')                                                  
print len(d)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
d = []
for i in range(n):
	d.append(int(input()))
d = sorted(d)
answer = 1
for i in range(1, n):
	if d[i-1] != d[i]:
		answer += 1
print(answer)

Submission status: Accepted

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

i = 1
j = 1
while i < N:
    if a[i-1] != a[i]:
        j += 1
    i += 1
    
print(j)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = '0'
l = []
ans = 0
temp = -1
n = int(raw_input())
for i in range(0, n):
    s = raw_input()
    if (s != ''):
        l += [int(s)]
l.sort()
for i in range(0, len(l)):
    if(l[i] != temp):
        ans += 1
        temp = l[i]

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
ls = []
ans = 0
for i in range(n) :
    x = int(input())
    if x in ls :
        continue
    ls.append(x)
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
l = int(raw_input())
arr = []
for i in range(l):
    s = raw_input()
    arr.append(s)
arr = sorted(arr, reverse=True)
counter = 1
for s in range(1,len(arr)):
    if arr[s] < arr[s-1]:
        counter+=1

print counter

Submission status: Accepted

Solution code:
N=int(input())
X=[]
Y=[]
S=0
for I in range(N):
	X.append(int(input()))
while X!=[] and S<len(X):
	if X[S] not in Y:
		Y.append(X.pop(S))
	else:
		S+=1
print(len(Y))

Submission status: Accepted

Solution code:
n = int(input())

mochies = []

for i in range(0, n):
    input_mochi = int(input())
    if input_mochi in mochies:
        continue
    else:
        mochies.append(input_mochi)

print(len(mochies))

Submission status: Accepted

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


print(len(set(m)))

Submission status: Accepted

Solution code:
n = int(input())
d = sorted([int(input()) for k in range(n)], reverse=True)
dp = [0 for _ in range(n)]

for i in range(n):
	found = False
	for j in reversed(range(i)):
		if d[j] > d[i]:
			dp[i] = dp[j] + 1
			found = True
			break
	if not found:
		dp[i] = 1
print(max(dp))

Submission status: Accepted

Solution code:
n = int(input())

s = set()
for _ in range(0, n):
  e = int(input())
  s.add(e)

print(len(s))

Submission status: Accepted

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

print(len(mochi))

Submission status: Accepted

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