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: Wrong Answer

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

print(len(set(nums)))

Submission status: Wrong Answer

Solution code:
n = int(input())
D = list(input() for i in range(n))
D = list(map(int,D))
daburi = 0
for i in range(n):
    for j in range(n):
        if i != j and D[i] == D[j]:
            daburi += 1
print(n - (daburi // 2))

Submission status: Wrong Answer

Solution code:
import sys
len(set(sys.stdin.read().split("\n")[1:-1]))

Submission status: Wrong Answer

Solution code:
mochi = []
n = int(input("N="))
k = 1
while k <= n:
    x = int(input("R="))
    mochi.append(x)
    k += 1

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

Submission status: Wrong Answer

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

d = list(set(d))

print(len(d))

Submission status: Wrong Answer

Solution code:
import sys

a = []
for line in sys.stdin:
    a.append(int(line))
    
print(len(set(a))-1)

Submission status: Wrong Answer

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

a.sort(reverse=True)#大きい順に並び替える

x = sum(a[::2])#奇数番目のみを取得する
y = sum(a[1::2])#偶数番目を取得する。1とすることで、始まりを1番からと指定できる(一番最初は0なので)

print(x-y)

Submission status: Wrong Answer

Solution code:
# https://atcoder.jp/contests/abc085/tasks/abc085_b
# setを使わない解き方
n = int(input().split()[0])
length_list = []

for _ in range(n):
    x = int(input().split()[0])
    length_list.append(x)

length_list = sorted(length_list)
print(length_list)
no_dup_list = []

for i in range(len(length_list)):
    if i == len(length_list) - 1:
         no_dup_list.append(x)
    else:
        x = length_list[i]
        next_x = length_list[i + 1]
        if x != next_x:
            no_dup_list.append(x)
        else:
            continue

print(len(no_dup_list))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

count = 1
stock = 0
for i in range(0, n-1):
    stock = a[i]
    if stock > a[i+1]:
        count += 1
    else:
        pass
print(count)

Submission status: Wrong Answer

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

dd = sorted(d, key=d.index)
print(len(dd))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
size = 1
N = int(input())
d_s = []
for _ in range(N):
  d_s.append(int(input()))
d_s.sort()
d_s.reverse()
for i in range(1,N):
  if d_s[i] > d_s[i-1]:
    size += 1
print(size)

Submission status: Wrong Answer

Solution code:
def sortex(X):
  X.sort()
  a=[]
  for i in range(len(X)-1):
    if X[i]!=X[i+1]:a.append(X[i])
  return a
n=int(input());a=[int(input())for i in range(n)];a=sortex(a);print(len(a))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
input();print(len(set(list(map(int, input().split())))))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = input()

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

cnt = []
for i in range(int(N)):
  cnt.append(a.count(a[0])-1)
  a.remove(a[0])
su = sum(cnt)
print(int(N)-su)

Submission status: Wrong Answer

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

chk = 101
for i in range(len(d)):
    if d[i] < chk:
        chk = d[i]
    else:
        print(i + 1)
        break

Submission status: Wrong Answer

Solution code:
import numpy as np

n = input()
a = np.array(list(map(int, input().split())))

print(len(np.unique(a)))

Submission status: Wrong Answer

Solution code:
print(len(set(open(0).readlines()[1:-1])))

Submission status: Wrong Answer

Solution code:
print(len(set(open(0).readlines()))-1)

Submission status: Wrong Answer

Solution code:
print(len(set(open(0).readlines()[1:]))-1)

Submission status: Wrong Answer

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

len(set(d))

Submission status: Wrong Answer

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

ds = set(d)
print(len(ds))

Submission status: Wrong Answer

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

print (mochi)

mochi_use = sorted(mochi,reverse = True)

ans = 1

for i in range(n-1):
    if mochi_use[i] > mochi_use[i+1]:
        ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
import collections


# n = int(input())
d = list(input().split(","))

c = collections.Counter(d)

# c

print(len(c.items()))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
a=[int(input()) for i in range(n)]
sorted(a)
ans=1
for i in range(n-1):
	if(a[i]==a[i+1]):
		continue
	else:
		ans+=1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
moti_total = int(input())
moti = []
for n in range(moti_total):
  moti.append(int(input()))
moti.sort()
tower = 1
for n in range(moti_total-1):
  if moti[n] is not moti[n+1]:
    print('n ' + str(moti[n]) + ' n2 ' + str(moti[n+1]))
    tower += 1
print(tower)

Submission status: Wrong Answer

Solution code:
#入力
N = int(input())
d = [int(i) for i in input().split()]

#setにすると重複する要素が覗かれる（順番が変わってしまうことに注意）
print(len(list(set(d))))

Submission status: Wrong Answer

Solution code:
input()
print(len(set(input().split())))

Submission status: Wrong Answer

Solution code:
N = int(input())
d = [ int(input()) for i in range(N)]
sorted(d)
mochi = d[0]
count = 1

for j in range(1, N):
  if( d[j] < mochi ):
    count += 1
    mochi = d[j]
    
  else:
    continue
    
print(count)

Submission status: Wrong Answer

Solution code:
N = int( input())
d = [ int(input()) for i in range(N)]
sorted(d)
mochi = int(d[0])
count = 1

for j in range(N - 1):
  if( d[j + 1] < mochi ):
    count += 1
    mochi == int(d[j + 1])
    
  else:
    continue
    
print(count)

Submission status: Wrong Answer

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

for j in range(N - 1):
  if( d[j + 1] <= mochi ):
    count += 1
    mochi == int(d[j + 1])
    
  else:
    continue
    
print(count)

Submission status: Wrong Answer

Solution code:
n=int(input())
d=map(int,input().split())
ds=list(set(d))
print(len(ds))

Submission status: Wrong Answer

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

a = set(mochi)
print(a)
a = len(a)
print(a)

Submission status: Wrong Answer

Solution code:
n = int(input())
d=sorted(list(map(int, input().split())))
cnt=0

m=0
while(m<len(d)):
    if(d[m-1]==d[m]):
        m+=1
    else:
        cnt+=1
        m+=1
        
print(cnt)

Submission status: Wrong Answer

Solution code:
n = int(input())
d=sorted(list(map(int, input().split())))
#d.append(-1)
cnt=0

m=0
while(m<len(d)-1):
    if(d[m]==d[m+1]):
        m+=1
    else:
        cnt+=1
        m+=1
        
print(cnt)

Submission status: Wrong Answer

Solution code:
n = int(input())
d=sorted(list(map(int, input().split())))
#d.append(-1)
cnt=0
print(d)
m=0
while(m<len(d)-1):
    if(d[m]==d[m+1]):
        m+=1
    else:
        cnt+=1
        m+=1
        

print(cnt)

Submission status: Wrong Answer

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

cnt = N
for i in range(N):
    for j in range(i+1, N):
        if d[i] == d[j]:
            cnt -= 1

print(cnt)

Submission status: Wrong Answer

Solution code:

Submission status: Wrong Answer

Solution code:
N=int(input())
mochi=sorted(list(map(int, [ input() for i in range(N)])),reverse=True)
count=1
kagami=mochi.pop(0)
for x in mochi:
    if x<kagami:
        kagami=mochi.pop(0)
        count+=1
    else:
        mochi.pop(0)
print(count)

Submission status: Wrong Answer

Solution code:
N = int( input())
D = []
for i in range(N):
    D.append(int(input()))
D = sorted(D)
ans = 1
d_now = D[0]
for i in range(1,N):
    if d_now < D[i]:
        print(D[i])
        ans += 1
        d_now = D[i]
print(ans)

Submission status: Wrong Answer

Solution code:
N = int( input())
D = []
for i in range(N):
    D.append(int(input()))
D = sorted(D)
print(D)
ans = 1
d_now = D[0]
for i in range(1,N):
    if d_now < D[i]:
        print(D[i])
        ans += 1
        d_now = D[i]
print(ans)

Submission status: Wrong Answer

Solution code:
N = int( input())
D = []
for i in range(N):
    D.append(int(input()))
sorted(D)
print(D)
ans = 1
d_now = D[0]
for i in range(1,N):
    if d_now > D[i]:
        ans += 1
        d_now = D[i]
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
mochis = sorted([int(input()) for _ in range(N)], reverse=True)
res = 0
for idx in range(1, N):
  if mochis[idx] > mochis[idx - 1]:
    res += 1

print(res)

Submission status: Wrong Answer

Solution code:
allrunrun = int(input())
moti = [int(i) for i in input().split()]

tyouhuku = set(moti)

print(len(tyouhuku))

Submission status: Wrong Answer

Solution code:
i = 0
N = int(input())
list = [int(input()) for i in range(N)]
print("before sort",list)

list.sort(reverse = True)
print("after sort",list)

j = 0
cnt = 1
temp = list[0]

for j in range(N):
    if(temp > list[j]):
        temp = list[j]
        cnt = cnt + 1

print(cnt)

Submission status: Wrong Answer

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

mochi =set(d_list)

print(mochi)
print(len(mochi))

Submission status: Wrong Answer

Solution code:
N = int(input())
A = sorted(list(map(int, input().split())), reverse=True)
A_cards = []
B_cards = []
flag = 'A'
for card in A:
    if flag == 'A':
        flag = 'B'
        A_cards.append(card)
    elif flag == 'B':
        flag = 'A'
        B_cards.append(card)
print(sum(A_cards) - sum(B_cards))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

d.sort()

k=[0]*n
k[0]=d[0]
j=0

for i in range(1,n):
    if d[i] != k[i-1]:
        j += 1
        k[j]=d[i]
        
j += 1
print(j)

Submission status: Wrong Answer

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

d.sort()

k=[0]*n
k[0]=d[0]
j=0

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

Submission status: Wrong Answer

Solution code:
n=int(input())

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

k=0


for i in range(n-1):
    print('i =',i)
    for j in range(i+1,n):
        if d[i]==d[j]:
            j -= 1
            break
    print('j =',j)
    if j == n-1:
        k += 1
k += 1

print('k =',k)

Submission status: Wrong Answer

Solution code:
N,ans,x=int(input()),0,0
s=sorted([int(input()) for i in range(N)])
print(s)
for i in range(N):
    if s[i]>x:
        ans+=1
        x=s[i]
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
nums=[int(input()) for i in range(n)]
nums.sort()
count=1
print(nums)

for i in range(1,n):
    if nums[i-1]==nums[i]:
        continue
    else:
        count += 1

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(N-count)

Submission status: Wrong Answer

Solution code:

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
# the first for-in loop nests the second one.
DIAMETERS = [int(x) for _ in range(N)
                    for x in input()]

def main():
    d_set = set(DIAMETERS)
    print(len(d_set))

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

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

last_mochi = 0
count = 0

for mochi in sorted(mochi_list):
    if last_mochi == mochi:
        break
    last_mochi = mochi
    count += 1

print(count)

Submission status: Wrong Answer

Solution code:
N = input()
print(len(set(input().split(' '))))

Submission status: Wrong Answer

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

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

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

    moti_list.append(paper)

Submission status: Wrong Answer

Solution code:
count=0
N=int(input())
d=[]
d=[int(input()) for i in range(N)]
for k in range (N-1):
    for j in range(k+1,N):
         dd1=d[k]
         dd2=d[j]
         if dd1==dd2 :break
    else:count+=1
print(count)

Submission status: Wrong Answer

Solution code:
count=0
N=int(input())
d=[]
d=[int(input()) for i in range(N)]
for k in range (N-1):
    for j in range(k+1,N-1):
         dd1=d[k]
         dd2=d[j]
         if dd1==dd2 :break
    else:count+=1
print(count)

Submission status: Wrong Answer

Solution code:
count=0
N=input()
d=[]
d=[int(input()) for i in range(int(N))]
for k in range (int(N)-1):
    dd1=d[k]
    dd2=d[k+1]
    if not dd1==dd2 :count+=1
print(count+1)

Submission status: Wrong Answer

Solution code:
n=input()
n=list(n)
print(len(n))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = input()
a = []
for i in range(N):
    a.append(input())
print a # [a1, a2, a3, ..., aN]
a= list(set(a))
a.sort()
print len(a)

Submission status: Wrong Answer

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

size = 0
max = 9999999999

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

Submission status: Wrong Answer

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 d
print len(d)

Submission status: Wrong Answer

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

print counter

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
check = 0
ANS = 1
line2 = 0
for i in range(N):
    if check == 0:
        line0 = input()
        check += 1
    elif check == 1:
        line1 = input()
        if line0 == line1 or line2 == line0:
            pass
        else:
            ANS += 1
        check = 2
        line0 = 0
    else:
        line2 = input()
        if line1 == line2:
            pass
        else:
            ANS += 1
        check = 1
print(ANS)

Submission status: Wrong Answer

Solution code:
l = int(raw_input())
arr = []
for i in range(l):
    s = raw_input()
    arr.append(s)

counterarr = []
for x in xrange(len(arr)):
    counter = 0
    for z in xrange(x, len(arr)):
        temp = arr[x]
        if arr[x] < arr[z]:
            counter+=1
    counterarr.append(counter)
if max(counterarr) == 0:
    print 1
    exit()

print max(counterarr)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
import numpy

N = input()
N_list = list(N)
map(str,N_list)
N_list = N_list.pop(0)

aaa = []

aaa = set(N_list)

ans = len(aaa)


print(ans)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
import numpy

N = input()
N_list = list(N)
map(str,N_list)
aaa = []

aaa = set(N_list)

ans = len(aaa)


print(ans)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
import numpy

N = input()
N_list = list(N)
map(str,N_list)
aaa = []

aaa = set(N_list)

ans = len(aaa)-1


print(ans)

Submission status: Wrong Answer

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 d
print len(d)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
import numpy

N = input()
N_list = list(N)
map(str,N_list)
aaa = []

aaa = set(N_list)

ans = len(N_list) - 1


print(ans)

Submission status: Wrong Answer

Solution code:
l = int(raw_input())
arr = []
for i in range(l):
    s = raw_input()
    arr.append(s)

counterarr = []
for x in xrange(len(arr)):
    counter = 0
    for z in xrange(x, len(arr)):
        temp = arr[x]
        if arr[x] <= arr[z]:
            counter+=1
    counterarr.append(counter)
if max(counterarr) == 0:
    print 1
    exit()

print max(counterarr)

Submission status: Wrong Answer

Solution code:
l = int(raw_input())
arr = []
for i in range(l):
    s = raw_input()
    arr.append(s)

counterarr = []
for x in xrange(len(arr)):
    counter = 0
    print arr[x]
    for z in xrange(x, len(arr)):
        temp = arr[x]
        if arr[x] <= arr[z]:
            counter+=1
    counterarr.append(counter)
if max(counterarr) == 0:
    print 1
    exit()

print max(counterarr)

Submission status: Wrong Answer

Solution code:
N = int(input())

lis = []

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

Ans = len(lis)

i = 0

while(1):
	if i == len(lis):
		break
	
	
	if lis.count(lis[i]) >= 2:
		Ans -= lis.count(lis[i])
		i += lis.count(lis[i])
	
	else:
		i += 1
	 
print(Ans+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
a = list(map(int,input().split()))
a = set(a)
print(len(a))

Submission status: Time Limit Exceeded

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

Submission status: Accepted

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

for i in range(num):
    n = int(input())
    a.append(n)
    
myset = set(a)

len_list = len(frozenset(myset))

print(len_list)

Submission status: Accepted

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

print(len(set(n_list)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

d.sort(reverse=True)

ans = 0

x = max(d)+1
for i in range(0,N):
  
  if d[i] < x:
    ans += 1
    x = d[i]

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from typing import List


def answer(n: int, d: List[int]) -> int:
    return len(set(d))

def main():
    n = int(input())
    d = list(int(input()) for _ in range(n))
    print(answer(n,d))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

l = []
for i in range(N):
  if d[i] not in l:
    l.append(d[i])
    
print(len(l))

Submission status: Accepted

Solution code:
# coding=utf-8
from math import floor, ceil, sqrt, factorial, log, gcd, log10
from itertools import accumulate, permutations, combinations, product, combinations_with_replacement, chain
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from heapq import heappop, heappush, heappushpop, heapify
from copy import copy, deepcopy
import sys
INF = float('inf')
mod = 10**9+7
sys.setrecursionlimit(10 ** 6)


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

# 1 2 3
# a, b, c = LI()


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

# a = I()


def I(): return int(sys.stdin.buffer.readline())

# abc def
# a, b = LS()


def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()

# a = S()


def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')

# 2
# 1
# 2
# [1, 2]


def IR(n): return [I() for i in range(n)]

# 2
# 1 2 3
# 4 5 6
# [[1,2,3], [4,5,6]]


def LIR(n): return [LI() for i in range(n)]

# 2
# abc
# def
# [abc, def]


def SR(n): return [S() for i in range(n)]

# 2
# abc def
# ghi jkl
# [[abc,def], [ghi,jkl]]


def LSR(n): return [LS() for i in range(n)]

# 2
# abcd
# efgh
# [[a,b,c,d], [e,f,g,h]]


def SRL(n): return [list(S()) for i in range(n)]


n = I()
d = IR(n)
print(len(set(d)))

Submission status: Accepted

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

dic = {}

for i in range(N):
  if d[i] in dic:
    dic[d[i]] += 1
  else:
    dic[d[i]] = 1

print(len(dic))

Submission status: Accepted

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

num = [0]*(max(d)+1)
for i in range(N):
  num[d[i]] +=1

res = 0

for i in range(max(d)+1):
  if num[i]:
    res += 1

print(res)

Submission status: Accepted

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

d.sort(reverse=True)

step = 1
for i in range(N-1):
  if d[i] > d[i+1]:
    step +=1

print(step)

Submission status: Accepted

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

original=[]
for i in d:
    if i not in original:
        original.append(i)
print(len(original))

Submission status: Accepted

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

Submission status: Accepted

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

D_num=list(set(D))
print(len(D_num))

Submission status: Accepted

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

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

print(len(set(lst)))

Submission status: Accepted

Solution code:
#85B
n=int(input())
data=[]
for i in range(0,n):
    data.append(int(input()))
res=sorted(data)
c=1
for j in range(1,n):
    if res[j]!=res[j-1]:
        c=c+1
print(c)

Submission status: Accepted

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
n = I()
li = [I() for _ in range(n)]
li.sort(reverse=True)
before = ans =  0
for i in range(n):
    if before != li[i]:
        ans += 1
        before = li[i]
print(ans)

Submission status: Accepted

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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(a)))

Submission status: Accepted

Solution code:
with open(0) as f:
    N, *d = map(int, f.read().split())
d = list(set(d))
print(len(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:
N = int(input())
d = []
for _ in range(N):
    x = int(input())
    d.append(x)
ans = len(set(d))
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**6)

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

print(len(set(d)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()

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

D_set = set(D)
ans = len(D_set)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
key = []
ans = 0
for _ in range(n):
    s = int(input())
    if s not in key:
        key.append(s)
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
d = [int(input()) for i in range(n)]
d = sorted(d, reverse=True)
ans = 0
last = 101
for i in d:
    if i < last:
        ans+=1
        last = i
print(ans)

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:
# https://atcoder.jp/contests/abc085/tasks/abc085_b

"""
上のほうが餅が小さくなるように重ねる
→ 同じサイズの餅は使えない

同じサイズの餅は1つだけ使って（重複を排除して）
大きいものから重ねていけばいい

何段重ねられるか
= 何種類のサイズの餅があるか
"""

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

print(len(mochi_set))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
z=[]
for num in range(101):
  z.append(0)
counter=0
while counter < N:
  d=int(input())
  z[d]=1
  counter+=1
result=sum(z)
print(result)

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

Submission status: Accepted

Solution code:
i = input()

l = []

for n in range(int(i)):
    n = input()
    l.append(n)

l = list(set(l))

print(len(l))

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
num = int(input())

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

setting = set(table)
print(len(setting))

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

Submission status: Accepted

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

se=set([])
for d in D:
	se.add(d)
print(len(se))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

set1 = set(list1)
ans = len(set1)
print(ans)

Submission status: Accepted

Solution code:
n=int(input())
d=list(map(int,[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()))
  
print(len(set(d)))