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:
import sys
input = sys.stdin.readline

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input().strip())

nums = [int(input().strip()) for _ in range(n)]

#-----

d_set = {i for i in nums}
print(len(d_set))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

print(len(set(A)))

Submission status: Accepted

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

print(len(set(array)))

Submission status: Accepted

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

for i in range(0,N):
  lst.append(input())

print(len(set(lst)))

Submission status: Accepted

Solution code:
def solve():
    N = int(input())
    B = [int(input()) for _ in range(N)]
    return len(set(B))

print(solve())

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

# inputをfor文でかく
for _ in range(N):
    d.append(input())

# ソートを行う
sortList = sorted(d, reverse=False)
count = 1

for i in range(N-1):
        #先の値と前の値の
        if sortList[i+1] > sortList[i]:
                count = count + 1
        else:
                continue


print(count)

Submission status: Accepted

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

max_d = 101
c = 0
answer = []

while len(ds) > 0:
  max_ds = max(ds)
  c+=1
  ds = [d for d in ds if d != max_ds]

print(c)

Submission status: Accepted

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

max_d = 101
c = 0
answer = []

while len(ds) > 0:
  max_ds = max(ds)
  max_d = max_ds
  c+=1
  ds = [d for d in ds if d != max_ds]

print(c)

Submission status: Accepted

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

max_d = 101
c = 0
answer = []

while len(ds) > 0:
  max_ds = max(ds)
  # if max_ds < max_d:
  max_d = max_ds
  c+=1
  ds = [d for d in ds if d != max_ds]

print(c)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = len(set(D))
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(d)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
dList = [int(input()) for _ in range(n)]
num = [0 for _ in range(101)]
for i in dList:
    num[i] += 1
count = 0
for i in num:
    if i:
        count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

set_ = set()
for n in range(N):
  _ = int(input())
  set_.add(_)

ans = len(set_)
print(ans)

Submission status: Accepted

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

cnt = 0
pre_diameter = 101

while len(D) != 0:
    diameter = max(D)
    if diameter < pre_diameter:
        cnt += 1

    D.remove(diameter)
    pre_diameter = diameter

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Dia_mochi=list(set(Dia_mochi))
print(len(Dia_mochi))

Submission status: Accepted

Solution code:
# 入力 : 縦並びの数字N個
N = int(input())
list_A = [0 for i in range(0,N)]
for i in range(0,N) :
    list_A[i] = int(input())

set_A = set(list_A)
print(len(set_A))

Submission status: Accepted

Solution code:
n = int(input())
print("{}".format(len(set(map(int, [input() for i in range(n)])))))

Submission status: Accepted

Solution code:
def main(n,d):
    #dを並び替え
    d.sort()
    #d[i]==d[i-1]の場合、使用できないのでcountをインクリメント
    count = 0
    for i in range(1, len(d)):
        if d[i-1] == d[i]:
            count += 1
    return n - count

n = int(input())
d = [input() for _ in range(n)]
print(main(n,d))

Submission status: Accepted

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

Submission status: Accepted

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

count = N
same = 0

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


d_new = sorted(d, reverse = True)
while j < N - 1:
	if d_new[j] == d_new[j + 1]:
		same += 1
	j += 1
ans = count - same
print(str(ans))

Submission status: Accepted

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

bucket = [0 for i in range(110)]
for i in range(N):
  bucket[d[i]] += 1

count = 0
for i in range(110):
  if bucket[i] != 0:
    count += 1

print(count)

Submission status: Accepted

Solution code:
N = int(input())
d = list(map(int, [input() for i in range(N)]))
d.sort()
count = 1

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

Submission status: Accepted

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

Submission status: Accepted

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

d.sort()
c = 1

for j in range(n-1):
    if d[j] == d[j+1]:
        pass
    elif d[j] < d[j+1]:
        c += 1
    else:
        pass

print(c)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

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

d=set(d)

print(len(d))

Submission status: Accepted

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

print(len(d))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print(len(set(list(map(int,open(0).read().split()))[1:])))

Submission status: Accepted

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

Submission status: Accepted

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

    print(len(D))


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

d=sorted(d)[::-1]
count=1
for p in range(N-1):
  if d[p]>d[p+1]:
    count+=1
    
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

mochi = list(set(mochi))
print(len(mochi))

Submission status: Accepted

Solution code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    n=INT()
    s=set()
    for i in range(n):
        s.add(INT())
    print(len(s))
if __name__ == '__main__':
    do()

Submission status: Accepted

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

x = dict()
ans = 0
for i in range(N):
    if d[i] in x:
        x[d[i]] += 1
    else:
        x[d[i]] = 1

for idx in x:
    ans += 1
print(ans)

Submission status: Accepted

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

num = set(d)

print(len(num))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
l = [int(input()) for i in range(n)]
l.sort(reverse=True)
count = 1
left = l[0]
for i in l:
  if i < left:
    count += 1
    left = i
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

num = [False]*110
for i in range(N):
    num[d[i]] = True

answer = 0
for i in range(100+1):
    if num[i]:
        answer += 1
print(answer)

Submission status: Accepted

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

d.sort()
first = d[0]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

# 重複削除
dn_list = list(set(dn_list))

print(len(dn_list))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

#n, a, b= map(int, input().split())
#n, x  = map(int, input().split())
#s = list(str(input()))
n = int(input())
#a = list(map(int, input().split()))

a = [""]*n
for i in range(n):
  a[i] = int(input())

#for i in range(n):
a.sort(reverse=True)
count = 0
for i in range(n-1):
  if(a[i] == a[i+1]):
    a[i] = 0

for i in range(n):
  if(a[i] != 0):
    count = count + 1
  
print(count)

Submission status: Accepted

Solution code:
n = int(input())
data = []
for i in range(n):
  d = int(input())
  data.append(d)
Data = sorted(data)
cnt = 0
tmp = -1
for i in Data:
  if(tmp < i):
    cnt += 1
    tmp = i
print(cnt)

Submission status: Accepted

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

d.sort()
# print(d)
for i in range(N-1):
    if d[i] < d[i+1]:
        answer += 1

print(answer)

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

Solution code:
_,*s = open(0)
print(len(set(s)))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
dl = [int(input()) for _ in range(n)]
dl.sort(reverse=True)

cnt = 1
d = dl[0]
for i in range(1,n):
    if d>dl[i]:
        cnt += 1
        d = dl[i]

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

N = int(_input())
D = {int(_input()) for _ in range(N)}
print(len(D))

Submission status: Accepted

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

pre = a[0]
ans = 1
for i in range(1,n):
  if pre < a[i]:
    ans += 1
  pre = a[i]
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# vim: set fileencoding=utf-8:
import sys
import collections
input = sys.stdin.readline

"""
H = int(input())
h = [int(ele) for ele in input().split()]
h = [0] + h
"""


def main():
    N = int(input())
    d = [0] * (N)
    for i in range(N):
        d[i] = int(input().rstrip())

    c = collections.Counter(d)
    print(len(c.keys()))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = int(input())
dat = {}
for _ in range(n):
    dat[int(input())] = True
print(len(dat.items()))

Submission status: Accepted

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

ans = 0
d.sort()
for i in range(n - 1):
    if d[i] < d[i + 1]:
        ans += 1
print(ans + 1)

Submission status: Accepted

Solution code:
"""
author : halo2halo
date : 24, Jan, 2020
"""

import sys

# import itertools
# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

N = int(readline())
S = set([int(readline().decode()) for _ in range(N)])

print(len(S))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
D = []
ans = 0
for _ in range(N):
    d = int(input())
    if d  not in D:
        D.append(d)
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
n = int(input())
d = [int(input()) for _ in range(n)]
print(len(list(set(d))))

Submission status: Accepted

Solution code:
n=int(input())

d=[input() for i in range(n)]

print(len(set(d)))

Submission status: Accepted

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



def main():
  n = int(input())
  tmp = {}
  for i in range(n):
    x = int(input())
    if x in tmp.keys():
      tmp[x] += 1
    else:
      tmp[x] = 0
  print(len(tmp))
    
  
if __name__ == "__main__":
  main()

Submission status: Accepted

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

#整数値入力 1文字の入力
def input_one_number():
    return int(input())

#整数値龍力　複数の入力
def input_multiple_number():
    return map(int, input().split())

#整数値龍力　複数の入力(配列)
def input_multiple_number_as_list():
    return list(map(int, input().split()))

#整数値龍力　複数の入力(配列で1つずつ渡される)
def input_multiple_number_as_list_sep(N):
    ins = []
    for i in range(N):
        ins.append(input())
    return ins

#2次元配列入力
def input_map():
    return [list(map(int,list(input()))) for i in range(h)]

#リスト出力
def print_list(list):
    print(*list)
    return

#2次元配列出力
def print_map(maplist):
    for i in maplist:print(*i, sep='')
    return

#素数生成
def generate_primenums():
    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)
    return primes

def memo():
    a=[0]*5
    b=a  #良くない配列のコピー
    b2=a[:]  #1次元のときはコピーはこれで良い
    a[1]=3
    print('b:{}, b2:{}'.format(b,b2))  #b:[0, 3, 0, 0, 0], b2:[0, 0, 0, 0, 0]
    
    import copy
    a= [[0]*3 for i in range(5)] #2次元配列はこう準備、[[0]*3]*5だとだめ
    b=copy.deepcopy(a)  #2次元配列はこうコピーする
    
    #内包表記奇数のみ
    odd=[i for i in range(100) if i%2==1] #[1, 3, 5, 7, 9, 11, 13, 15, 17, 19]

    #二部探索
    import bisect
    a = [1, 2, 3, 5, 6, 7, 8, 9]
    b=bisect.bisect_left(a, 8)

    #combinations、組み合わせ、順列
    from itertools import permutations, combinations,combinations_with_replacement,product
    a=['a','b','C']
    print(list(permutations(a)))
    print(list(combinations(a,2)))
    print(list(combinations_with_replacement(a,3)))


#階乗
def kaijo(n):
    import math
    return math.factorial(n)

#選び方（コンビネーション nCr）
def num_combination(n,r):
    import math
    return math.factorial(n) // math.factorial(n - r)


#最大公約数、最小公倍数
def calc_gcd(a,b):
    import fractions
    GCD=fractions.gcd(a,b)
    lcm=a*b//gcd
    return gcd,lcm

#複数の最大公約数
def calc_gcd_list(l):
    gcd = l[0]
    for i in range(1, N):
        gcd = fractions.gcd(gcd, l[i])
    return gcd

#各桁の和
def sum_digit(n):
    sum = 0
    while n > 0:
        sum += n%10
        n //= 10
    return sum

N = input_one_number()
lst_d = input_multiple_number_as_list_sep(N)

lst_d.sort()

dan = len(lst_d)

before = 100000
for i in lst_d:
    if before == i:
        dan -= 1
    before = i

print(dan)

Submission status: Accepted

Solution code:
N = int(input())
D = len({int(input()) for _ in range(N)})
print(D)

Submission status: Accepted

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

now = mochi.pop(0)
cnt = 1
for i in mochi:
    if i < now:
        now = i
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
N = int(input())
D = len({int(input()) for _ in range(N)})
print(D)

Submission status: Accepted

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

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

lst.sort()

for i in range(N):
    if i == 0:
        pass
    elif lst[i] == lst[i-1]:
        pass
    else:
        ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

dd = np.sort(np.unique(d))[::-1]


#print(d)
#print(dd)

print(len(dd))

Submission status: Accepted

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

Submission status: Accepted

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

s=0
cnt=0
for i in d:
 if s<i:
  cnt+=1
  s=i
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

lst = map(int, [input() for i in range(n)])

print(len(set(lst)))

Submission status: Accepted

Solution code:
N = int(input())
D = {input() for _ in range(N)}

print(len(D))

Submission status: Accepted

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

for i in range(n):
  a.add(int(input()))

print(len(a))

Submission status: Accepted

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

print(len(lst1))

Submission status: Accepted

Solution code:
n = int(input())

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

mochis.sort(reverse=True)
cnt = 0
beforeMochies = 101
for mochi in mochis:
  if beforeMochies != mochi:
    cnt+=1
  
  beforeMochies = mochi
  
print(cnt)

Submission status: Accepted

Solution code:
N = int(input())

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

    
    
print(len(d))

Submission status: Accepted

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

d = sorted(d, key = lambda x: -x)
count = 0
candidate = 1000
for i in d:
  if candidate > i:
    candidate = i
    count += 1
print(count)

Submission status: Accepted

Solution code:

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

print(len(set(d)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
Set = {int(input()) for i in range(n)}

print(len(Set))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
len = int(input())
d = []
count = 1
for x in range(len):
    d.append(int(input()))

d.sort()
for x in range(len-1):
    if d[x] != d[x+1]:
        count += 1
print(count)

Submission status: Accepted

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

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())
print(len(set(map(int, [input() for _ in range(n)]))))

Submission status: Accepted

Solution code:
nums = [int(input()) for _ in range(int(input()))]
num_dict = dict()
for i in nums:
    num_dict[i] = True
#print(num_dict)
print(len(num_dict.keys()))

Submission status: Accepted

Solution code:
n = int(input())
d = list({int(input()) for _ in range(n)})
d.sort()
print(len(d))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
D = []
count = 0
while count < N:
  D.append(int(input()))
  count += 1

print(len(list(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 python
"""AtCoder Beginner Contest 085: B - Kagami Mochi
https://atcoder.jp/contests/abc086/tasks/abc085_b
"""

__author__ = 'bugttle <bugttle@gmail.com>'


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

    array = set()
    for _ in range(N):
        d = int(input())
        array.add(d)

    print(len(array))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
N = int(input())
A = set()
for _ in range(N):
  A.add(int(input()))
print(len(A))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
mochi = set()

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

Submission status: Accepted

Solution code:
D = sorted( [int(input()) for _ in range(int(input()) )])
dMax = max(D)
ans= 0
for i in range(1, dMax+1):
    if i in D:
        ans+=1
    
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

if __name__ == "__main__":
    args = sys.stdin.read().split()
    ricecakes_list = list(map(int, args[1:]))
    ricecakes_set = set(ricecakes_list)
    print(len(ricecakes_set))

Submission status: Accepted

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

for i in range(n):
  l.append(input())
  
print(len(set(l)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
d=[int(input()) for x in range(n)]
d.sort()
c=0
for i in range(n-1):
  if d[i]==d[i+1]:c+=1
print(n-c)

Submission status: Accepted

Solution code:
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 = {int(input()):1 for _ in range(N)}

print(len(d))

Submission status: Accepted

Solution code:
N = int(input())

# N枚の餅のサイズを受け取る
d = []
for i in range(N):
  d.append(int(input()))
  d.sort()

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

print(count + 1)

Submission status: Accepted

Solution code:
N = int(input())
D = [0]
X = 0
for i in range(N):
  D.append(int(input()))
d = sorted(D, reverse=True)
for j in range(N):
  if d[j] > d[j+1]:
    X += 1
print(X)

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(input())
d=[]
for i in range(n):
	d.append(int(input()))
d.sort(reverse=True)
ans=1
for i in range(1,n):
	if(d[i]<d[i-1]):
		ans=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())
list=[int(input()) for i in range(N)]
print(len(set(list)))

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
N=int(input())
A=[]
for i in range(N):
    A.append(int(input()))
print(len(set(A)))

Submission status: Accepted

Solution code:
number=input().rstrip()
number=int(number)
mochi=[input().rstrip() for i in range(number)]
mochi=list(map(int,mochi))
mochi.sort()
#print(mochi)
count=1
for i in range(number-1):
    if mochi[i]<mochi[i+1]:
        count+=1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

d = sorted(d, reverse=True)

tmp = 0
step = 0
for x in d:
    if tmp != x:
        step += 1
        tmp = x
    else:
        tmp = x
print(step)

Submission status: Accepted

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

mochi = []
for i in range(N):
    if mochi.count(d[i]) == 0:
        mochi.append(d[i])

print("{}".format(len(mochi)))

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())
L=[]
n=0

for i in range(N):
    L.append(int(input()))
    Lsort=sorted(L)
# print(Lsort)

for j in range(N-1):
    if Lsort[j]==Lsort[j+1]:
        n-=1

print(N+n)

Submission status: Accepted

Solution code:
import sys
from itertools import groupby

def resolve():
    input = sys.stdin.readline
    N=int(input())
    d= sorted(list(map(int, [input() for _ in range(N)])),reverse=True)
    a=[]
    for key, group in groupby(d):
        a.append(key)  
    print(len(a))
    
from io import StringIO
import unittest

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """4
10
8
8
6"""
        output = """3"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """3
15
15
15"""
        output = """1"""
        self.assertIO(input, output)
    def test_入力例_3(self):
        input = """7
50
30
50
100
50
80
30"""
        output = """4"""
        self.assertIO(input, output)

if __name__ == "__main__":
    #unittest.main()
    resolve()

Submission status: Accepted

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

dic = {}
for i in range(len(D)):
    dic[D[i]] = 1
print(len(dic))

Submission status: Accepted

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