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

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

print(len(set(d)))

Submission status: Accepted

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

dest_list = list(set(in_list))
print(len(dest_list))

Submission status: Accepted

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

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

d=sorted(d,reverse=True)
ans=1
for i in range(n-1):
  if (d[i]>d[i+1]):
    ans+=1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
l = []
for i in range(n):
    d = int(input())
    l.append(d)
# print(l)
ans = 0
com = 0
l.sort(reverse=True)
for j in l:
    if j < com:
        ans += 1
        com = j
    elif j > com:
        ans = 1
        com = j
    # print(ans, com)

print(ans)

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# solution
import io

n=int(input())
m=[int(input()) for i in range(n)]
print(len(set(m)))

Submission status: Accepted

Solution code:
import numpy as np

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


print(len(np.unique(d)))

Submission status: Accepted

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


def solve(N: int, d: "List[int]"):
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    N = int(input())
    d = [int(input()) for i in range(N)]
    print(len(set(d)))
    return



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
len_d = int(input())
ans=0
al=[]
for _ in range(len_d):
  ll=int(input())
  al.append(ll)

al.sort()

print(len(set(al)))

Submission status: Accepted

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

s = set(d)

print(len(s))

Submission status: Accepted

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


if '__main__' == __name__:
    resolve()

Submission status: Accepted

Solution code:
n = int(input())

mochi_list = []

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

mochi_set = set(mochi_list)

stacked_num = len(mochi_set)

print(stacked_num)

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    M = [int(input()) for _ in range(N)]
    M.sort()
    h = 0
    top = 1000
    for i in range(N):
        m = M.pop()
        if m < top :
            top = m
            h += 1
    print(h)
main()

Submission status: Accepted

Solution code:
n = int(input())
bucket = [0]*(101)

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

for i in range(n):
    bucket[d[i]] += 1

counter = 0

for num in bucket:
    if num > 0:
        counter+=1

print(counter)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC 085: B – Kagami Mochi
n = int(input())
d = [int(input()) for s in range(n)]
print(len(set(d)))

Submission status: Accepted

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

d = sorted(d, reverse=True)

dan = 1
current_size = d[0]

for i in range(1, N):
    if d[i] < current_size:
        dan += 1
        current_size = d[i]
print(dan)

Submission status: Accepted

Solution code:
n = int(input())
c = 0
record = []
for i in range(n):
    val = int(input())
    if not val in record:
        record.append(val)
        c += 1
print(c)

Submission status: Accepted

Solution code:
n=int(input())
a=[]
while n>0:
    b=int(input())
    a.append(b)
    n-=1
print(len(set(a)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# B - Kagami Mochi
N = int(input())
d = list(int(input()) for i in range(N))

print(len(set(d)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input()) #1行目のNを取得する
s = [input() for i in range(N)] #複数行の数値の入力を取得
 
s_set = set(s)
 
l = len(s_set)
 
print(l)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#B - Kagami Mochi
N = int(input())
d = []
for i in range(N):
    d.append(int(input()))
ans = [0] * 100
for i in range(N):
   ans[d[i]-1] = 1
print(sum(ans))

Submission status: Accepted

Solution code:
N,*D =map(int,open(0).read().split())
D =set(D)
print(len(D))

Submission status: Accepted

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

s = set(d)

print(len(s))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import deque
from heapq import heapify,heappop,heappush,heappushpop
from copy import copy,deepcopy
from itertools import permutations,combinations
from pprint import pprint

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

def mycol(data,col):
    return [ row[col] for row in data ]

def mysort(data,col):
    data.sort(key=lambda x:x[col],reverse=False)
    return data

def mymax(data):
    M = -1*float("inf")
    for i in range(len(data)):
        m = max(data[i])
        M = max(M,m)
    return M

def mymin(data):
    m = float("inf")
    for i in range(len(data)):
        M = min(data[i])
        m = min(m,M)
    return m

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

print(len(set(d)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
array = []
for i in range(n):
    array.append(int(input()))
array = sorted(array,reverse=True)

mochi = 1
for i in range(n):
    if i != 0:
        if array[i-1] > array[i]:
            mochi += 1

print(mochi)

Submission status: Accepted

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

ans = 0
sub = 101
d.sort(reverse=True)
for i in range(n):
    if sub > d[i]:
        ans += 1
        sub = d[i]

print(ans)

Submission status: Accepted

Solution code:
N = int(input())
d = [int(input()) for i in range(N)]
d = list(set(d))
d = sorted(d)
m = max(d)
print(str(d.index(m) + 1))

Submission status: Accepted

Solution code:
import sys
import os
import math

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

MOD = 10 ** 9 + 7


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    m = [ii() for _ in range(ii())]
    print(len(set(m)))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
l = []
ans = []
for i in range(N):
  l.append(int(input()))
l.sort()
ans.append(l[0])
for i in range(1,N):
  if ans[-1] != l[i]:
    ans.append(l[i])
print(len(ans))

Submission status: Accepted

Solution code:
# solution ver.連想配列（つまり辞書）
N = int(input())
num = [0 for i in range(N)]   

dict1 = {}    # キーは入力値、値はそのキーがあれば１なければ０（ない値は対応するキーがそもそもないから、すべての値は１）
for i in range(N):
    dict1[input()] = 1
    
list1 = list(dict1.values())
print(len(list1))

Submission status: Accepted

Solution code:
# 与えられた数字の中で、異なる数字はいくつあるか、を調べればよい

# バケット法とは、配列を用意しておいて　インデックス番号iの要素 = iの個数　として問題を解くものである。
# 例えば、[2,4,32]という配列は「0が2個　1が4個　2が32個　存在する」ということを意味する

# iが大きくなるとメモリが足りなくなるのでその際は連想配列を使う

# solution ver.バケット法
N = int(input())
flag = [0 for i in range(101)] # 要素はインデックス番号と同じ数字の個数を意味する
num = [0 for i in range(N)]    # 入力されるN個の整数が順番に格納される

for i in range(N):
    num[i] = int(input())
    
for i in range(N):
    flag[num[i]] = 1

print(sum(flag))

Submission status: Accepted

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

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())
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)]
d = set(D)
print(len(d))

Submission status: Accepted

Solution code:
import numpy as np
if __name__ == "__main__":
    # 入力パターン．
    # 先に要素数Nが与えられて，その数読み込むパターン
    ### N
    ### d_1 
    ### ...
    ### d_N
    N = int(input())
    d = []
    for i in range(N):
        d_i = int(input())
        d.append(d_i)
    #d = np.sort(np.array(d))[::-1] # 大->小
    #print(d)
    print(len(set(d)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC085 A

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict

n = int(input())
dic = defaultdict(int)

for i in range(n):
    dic[int(input())] += 1

print(len(dic))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
try:
    from typing import List
except ImportError:
    pass


def solve(N: int, d: "List[int]"):
    print(len(set(d)))


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    d = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, d)


if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(N):
  d[i] = int(input())
d = sorted(d, reverse=True)

ans = 0
for i in range(N):
  if len(stack) == 0:
    stack.append(d[i])
  elif stack[-1] == d[i]:
    continue
  elif stack[-1] > d[i]:
    stack.append(d[i])
  else:
    ans = max(ans, len(stack))
    stack = [d[i]]

ans = max(ans, len(stack))
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

d = dict()

for i in range(n):
    x = int(input())
    if x not in d:
        d[x] = x
    else:
        continue

print(len(d))

Submission status: Accepted

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

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:
a = int(input())
b = list(input() for i in range(a))
 
b = sorted(set(b))
print(len(b))

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())
d_list = [0] * n
count = 0
check = False

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

for i in range(110):
  for j in range(n):
    if d_list[j] == i:
      check = True
  if check == True:
    count += 1
    check = False

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

d = sorted(d)

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 = set(list(int(input()) for _ in range(n)))
print(len(D))

Submission status: Accepted

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

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 = []
for _ in range(N):
    di = int(input())
    D.append(di)

D = set(D)

print(len(D))

Submission status: Accepted

Solution code:
a = []
dan = 1
N = int(input())
for i in range(1,N+1):
  d = int(input())
  a.append(d)
a.sort(reverse = True)
for i in range(N-1):
  if a[i] > a[i+1]:
    dan += 1
print(dan)

Submission status: Accepted

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

D = {}
for i in d:
  D[i] = 0

#for i in d:
#  D[i] = D[i] + 1
print(len(D))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input()) 
d = []
for i in range(n):
    d.append(int(input()))
    
d=list(set(d))
d.sort()
before=0
ans=0
for i in d:
    if i > before:
        ans += 1
    else:
        break
    before = i
    
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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



print(len(set(a)))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = []
for i in range(n):
    a.append(int(input()))
dic = {}
for i in a:
    if i not in dic:
        dic[i] = 1
    else:
        dic[i] += 1
print(len(dic))

Submission status: Accepted

Solution code:
# python 3.4.3
import sys
input = sys.stdin.readline

# -------------------------------------------------------------
# library
# -------------------------------------------------------------



# -------------------------------------------------------------
# main
# -------------------------------------------------------------
N = int(input())
D = set(int(input()) for _ in range(N))

print(len(D))

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

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:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

#print(num_list)
#print(len(num_list))
#print(list(set(num_list)))
print(len(list(set(num_list))))

Submission status: Accepted

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

answer = len(set(d_list))
print(answer)

Submission status: Accepted

Solution code:
#import itertools
#import fractions
#import numpy as np
#mod = 10**4 + 7
"""def kiri(n,m):
  r_ = n / m
  if (r_ - (n // m)) > 0:
    return (n//m) + 1
  else:
    return (n//m)"""
 
# Written by NoKnowledgeGG @YlePhan
 
#import math
#mod = 10**9+7
 
 
 
def main():
  n = int(input())
  d = [int(input()) for _ in range(n)]
  d = set(d)
  print(len(d))
if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
print len({input() for i in range(input())})

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(A)))

Submission status: Accepted

Solution code:
N = int(input())#数字
X = list((input()) for i in range(N))  #複数行１列のリスト
print(len(set(X)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

d = sorted(set(d))
print(len(d))

Submission status: Accepted

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

INF = float('inf')

"""
S = input()
N = int(input())
N, A, B = map(int, input().split())
A = list(map(int, input().split()))
D = [input() for _ in range(N)]
"""

def main():
    N = int(input())
    D = [int(input()) for _ in range(N)]
    D = sorted(list(set(D)), reverse=True)

    print(len(D))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

n = ii()
D = []
for i in range(n):
    D.append(ii())
print(len(set(D)))

Submission status: Accepted

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


print(len(set(s)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(arr)))

Submission status: Accepted

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

print(len(new))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
a=[]
for i in range(n):
    a.append(int(input()))
a=sorted(a,reverse=True)
x=1
for i in range(n-1):
    if a[i]!=a[i+1]:
        x+=1
    else:
        x+=0
print(x)

Submission status: Accepted

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

print(len(ans))

Submission status: Accepted

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

print(len(set(d)))

Submission status: Accepted

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

Submission status: Accepted

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

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_list = []
for i in range(n):
    val = int(input())
    if val:
        d_list.append(val)
for j in range(n):
    for k in range(n):
        if j == k:
            pass
        else:
            if d_list[j] == d_list[k]:
                d_list[k] = 0
print(len([a for a in d_list if a > 0]))

Submission status: Accepted

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

moti_list = list(set(d))

print(len(moti_list))

Submission status: Accepted

Solution code:
n = int(input())
A = [int(input()) for i in range(n)]
list = [0] * n
ans = 0

for i in range(n):
    if A[i] not in list:
        ans = ans + 1
        list[i] = A[i]

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
d = {}
for i in range(n):
    t = int(input())
    d[t] = d.get(t, 0) + 1

print(len(d))

Submission status: Accepted

Solution code:
n = int( input() )

d = []

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

d.sort(reverse=True)

cnt = 1

for s in range(0, len(d)-1):
  if (d[s] > d[s+1]):
    cnt = cnt + 1





print(cnt)

Submission status: Accepted

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

d.sort(reverse=True)

#重複する数値ペアの数をカウントして，nから引けばいい
dupe = 0
for i in range(len(d)-1):
    if d[i] == d[i+1]:
        dupe += 1

print(int(n)-dupe)

Submission status: Accepted

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

Submission status: Accepted

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

b=list(set(a))
print(len(b))

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    t = int(input())
    s = []
    for i in range(t):
        s.append(int(input()))
    print(len(set(s)))

Submission status: Accepted

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

print(len(set(d)))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 標準入力の取得
N = int(input())
d_list = [int(input()) for i in range(N)]

# 重複を削除すると、その要素数が答えになる
d_set = set(d_list)
print(len(d_set))

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
D = np.array([int(input()) for _ in range(N)])
c = np.bincount(D)
ans = np.count_nonzero(c)
print(ans)

Submission status: Accepted

Solution code:
import sys
from math import sqrt
from collections import Counter

input = sys.stdin.readline


def I():
    return int(input())


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


def LI():
    return list(MI())


def LIN(n: int):
    return [I() for _ in range(n)]


inf = float("inf")
mod = 10 ** 9 + 7


def main():
    n = I()
    d = LIN(n)

    print(len(set(d)))
    pass


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n=int(input())

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

d.sort()
d=set(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:
class KagamiMochi:
    def __init__(self):
        self.counter =1
    def count_mochi(self, mochi_num, mochi_list):
        new_list = list(set(mochi_list))
        new_list_int = [int(s) for s in new_list]
        sort_mochi_list = sorted(new_list_int, reverse=True)
        latest_mochi = sort_mochi_list[0]
        for m in sort_mochi_list:
            if int(m) < int(latest_mochi):
                latest_mochi = int(m)
                self.counter += 1
        return self.counter
            


if __name__ == "__main__":
    N = int(input())
    S = [input() for _ in range(N)]
    km = KagamiMochi()
    result = km.count_mochi(N, S)
    print(str(result))

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:
Row = int(input())
List = [input() for i in range(Row)]
print(len(set(List)))

Submission status: Accepted

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

print(len(set(a)))

Submission status: Accepted

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

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

bucket_sort = [0] * 101

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

  if bucket_sort[d] != 1:
    bucket_sort[d] = 1

ans = 0
#import pdb; pdb.set_trace()

for k in bucket_sort:
  ans +=  k

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())
A = [0]*N
for i in range(N):
  A[i] = int(input())
  
ans = len(set(A))
print(ans)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

    ds = set(ds)
    ans = len(ds)
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:

import math
import itertools
import statistics
import collections

n = int(input())
#a = list(map(int, input().split()))
d = []
for i in range(n):
    d.append(int(input()))

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

#print(d)
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

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

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

Submission status: Accepted

Solution code:

n = int(input())
d = [0] * n
for i in range(n):
    d[i] = int(input())
    
class Node:
    def __init__(self, data):
        self.data = data
        self.right = None
        self.left = None

class BST:
    def __init__(self, number_list):
        self.root = None
        for data in number_list:
            self.insert(data)
    
    def insert(self, data):
        n = self.root
        if n == None:
            self.root = Node(data)
            return
        else:
            while True:
                entry = n.data
                if entry > data:
                    if n.left is None:
                        n.left = Node(data)
                        return
                    n = n.left
                elif entry < data:
                    if n.right is None:
                        n.right = Node(data)
                        return
                    n = n.right
                else:
                    n.data = data
                    return

    #中間順探索
    def inorder(self,node,ll):
        if node is not None:
            self.inorder(node.left,ll)
            ll.append(node.data)
            self.inorder(node.right,ll)
        return ll

bst = BST(d)
ll = []
print(len(bst.inorder(bst.root,ll)))