Problem:


Score : 200 points

Problem Statement

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

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

Constraints

1 ≤ N ≤ 100

1 ≤ d_i ≤ 100

All input values are integers.

Input

Input is given from Standard Input in the following format:

N
d_1
:
d_N

Output

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

Sample Input 1

4
10
8
8
6

Sample Output 1

3

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

Sample Input 2

3
15
15
15

Sample Output 2

1

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

Sample Input 3

7
50
30
50
100
50
80
30

Sample Output 3

4



Sample input:
4
10
8
8
6


Sample output:
3

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
li=[int(input()) for k in range(n)]

lis=[0]*110
a=0

for i in range(0,n):
   lis[li[i]]+=1
for j in range(0,101):
    if lis[j]>0:
        a+=1

print(a)

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:
from collections import Counter
n = int(input())
d = [int(input()) for i in range(n)]
print(len(Counter(d).keys()))

Submission status: Accepted

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

d_list.sort(reverse=True)
bottom = d_list[0]
count = 1
for d in d_list[1:]:
    if bottom > d:
        bottom = d
        count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
import sys

def input(): 
    return sys.stdin.readline().strip()

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

Submission status: Accepted

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

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:
size = int(input())
mochi = [0]*size

for i in range(0, size):
    mochi[i] = int(input())
    
mochi = list(set(mochi))
mochi.sort()

print(len(mochi))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# バケット法を用いる
def kagamiMochi():
	N = int(input())
	d = []
	for _ in range(0, N):
		d.append(int(input()))

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

	count = 0
	for j in num:
		if j:
			count += 1
	print(count)

kagamiMochi()

Submission status: Accepted

Solution code:
def kagamiMochi():
	N = int(input())
	d = []
	for _ in range(0, N):
		d.append(int(input()))
	d.sort()
	count = 1
	for j in range(1, N):
		if d[j] != d[j-1]:
			count += 1
	print(count)

kagamiMochi()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 0
pre = 0
for m in M:
    if m > pre:
        pre = m
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
N = int(input())
print(len(set(input() for i in range(N))))
#重複する要素を取り除きます。順番はなんでも良く、要素の数だけ重ねられます。

Submission status: Accepted

Solution code:
from sys import stdin
N = input()
print(len(set(stdin.read().splitlines())))

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:
N = int(input())
d = list(int(input()) for i in range(N))
ans = 0
max_d = 0
d.sort()

for i in range(N):
    if max_d < d[i]:
        max_d = d[i]
        ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

s=set(l)
print(len(s))

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:
# 鏡餅の段数、X種類の直径の餅があればX段重ねの鏡餅ができることを使う
dan = 0
N = int(input())
A = [int(input()) for i in range(N)]
for j in range(101):
    if j in A:
        dan += 1
print("{}".format(dan))

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(n):
    L.append(input())
L_unique = list(set(L))
            
print(len(L_unique))

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

Submission status: Accepted

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

n = int(input())
d = []
result = 1

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

d.sort()
for i in range(1, len(d)):
    if d[i-1] < d[i]:
        result += 1

print(result)

Submission status: Accepted

Solution code:
n=int(input())

kagami=set()

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

print(len(kagami))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
length = int(input())
mochi = [int(input()) for i in range(length)]
sorted_mochi = sorted(mochi,reverse=True)
stage = 1
for i in range(0,length-1):
  if sorted_mochi[i] > sorted_mochi[i+1]:
    stage +=1
  else:
    pass
print(stage)

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

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

cnt = 1

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


print(cnt)

Submission status: Accepted

Solution code:
# coding: utf-8
import time
import re
import math
import fractions

def main():
    N=int(input())
    D=[int(input()) for a in range(N)]
    print(len(set(D)))
start=time.time()
main()
#print("処理速度 {}sec".format(time.time()-start))
#"YNeos"[True::2]
#A=list(map(int,input().split()))
#A,B,C=map(int,input().split())
#n=int(input())
# global n,A,s,memo,mx,mn,L,B

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin


n = int(stdin.readline().rstrip())

arr = []
for i in range(n):
    arr.append(int(stdin.readline().rstrip()))

print(len(set(arr)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

print(len(d_list))

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:
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

N = n()

D = []
for i in range(N):
    D.append(n())

D = sorted(D)

count = 1
prev = D[0]
for i in range(1, len(D)):
    if prev < D[i]:
        count += 1
    prev = D[i]
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

input_list.sort()
list_mochi = sorted(set(input_list), key=input_list.index)
 
print(len(list_mochi))

Submission status: Accepted

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

cnt = 1
tmp = LIST.pop()
while True:
    if len(LIST) == 0:
        break
    Di = LIST.pop()
    if Di < tmp:
        cnt = cnt + 1
        tmp = Di

print(cnt)

Submission status: Accepted

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

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())
temp = list()
for n in range(N):
  temp.append(input())

print(len(set(temp)))

Submission status: Accepted

Solution code:
def abc():
    n = int(input())
    mochi = set()
    for i in range(n):
        mochi.add(int(input()))
    print(len(mochi))


abc()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

data = []
for _ in range(n):
    data.append(int(input()))

data_set = set(data)

print(len(data_set))

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

Submission status: Accepted

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

Submission status: Accepted

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


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


# Generated by 1.1.4 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():
    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())
dl=[int(input()) for _ in range(n)]
al=set(dl)
print(len(al))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect
import os
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import re
import sys

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

sys.setrecursionlimit(2147483647)
INF = float("inf")

N = int(sys.stdin.readline())
D = [int(sys.stdin.readline()) for _ in range(N)]

print(len(set(D)))

Submission status: Accepted

Solution code:
N = int(input())

list = []
for i in range(N):
    d = input()
    if d not in list:
        list.append(d)

print(len(list))

Submission status: Accepted

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

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:
import re  # 正規表現, findall('正規表現', 文字列), search('正規表現', 文字列)
import sys # プログラム終了：sys.exit()
# sys.setrecursionlimit(10**6) # 再帰呼び出しの上限を上げる

def i_input(): return int(input())
def s_input(): return map(int,input().split())
def l_input(): return list(map(int, input().split()))
# 文字列のまま受け取りたいときはinput()

n = i_input()
D = []

for _ in range(n):
    D.append(i_input())

D_set = set(D)

print(len(D_set))

Submission status: Accepted

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

while True:
    try:
        d.append(int(input()))
    except EOFError:
        break


print(len(set(d)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
li = []
for i in range(n):
    li.append(int(input()))
list.sort(li,reverse = True)
total = 0
for i in range(n):
    if i == 0:
        total += 1
        continue
    else:
        if li[i] == li[i-1]:
            continue
        else:
            total += 1
print(total)

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

Submission status: Accepted

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

print(len(list(set(xs))))

Submission status: Accepted

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

from math import *
from itertools import *
from collections import *
from bisect import *


if __name__ == '__main__':
    n = int(input())
    s = set([int(input()) for _ in range(n)])
    print(len(s))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

dls = []

for n in range(N):
    dls.append(int(input()))

dls.sort(reverse = True)

count=0
prev_length = 10**10
for nowRice in dls:
    
    if(prev_length > nowRice):
        count += 1
    prev_length = nowRice

print(count)

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    N = int(input())
    d = [int(input()) for x in range(N)]
    print(len(list(set(d))))

Submission status: Accepted

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

Submission status: Accepted

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

dd.sort()
tmp = 0
ans = 0
for d in dd:
	if not d == tmp:
		ans += 1
		tmp = d
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())
s = set()
for _ in range(N):
    s.add(input())
print(len(s))

Submission status: Accepted

Solution code:

N = int(input())

lst_A = []

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

lst_A = list(set(lst_A))

print(len(lst_A))

Submission status: Accepted

Solution code:
import math

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

n = int(input())

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

a = set(a)

print(len(a))

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(N):
    d.add(input())

print(len(d))

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(M)))

Submission status: Accepted

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

Submission status: Accepted

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

flg = 0


for i,j in enumerate(d):
    if i == 0:
        flg += 1
    else:
        if d[i-1] != d[i]:
            flg += 1
        else:
            pass
print(flg)

Submission status: Accepted

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

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

Submission status: Accepted

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

a.sort()

for i in range(n) :
    if inc2 == 0 :
        inc += 1
    
    if i == n -1 :
        break
    if a[i] == a[i+1] :
        inc2 = 1
    else :
        inc2 = 0

print(inc)

Submission status: Accepted

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

    d_list = list(set(d_list))

    print(len(d_list))

Submission status: Accepted

Solution code:
n = int(input())
list1 = []
list2 = []
for i in range(0,n):
    list1.append(int(input()))

for i in range(0,len(list1)):
    if not(list1[i] in list2):
        list2.append(list1[i])
print(len(list2))

Submission status: Accepted

Solution code:
n=int(input())
a = []
for _ in range(n):
    a.append(int(input()))
b=[]
for x in range(1,101):
 for y in range(n):
     if a[y]==x:
        b.append(a[y])
        break

print(len(b))

Submission status: Accepted

Solution code:
n=int(input())
d=[int(input()) for _ in range(n)]
d.sort(reverse=True)
count=0
for i in range(n):
    if d[i-1]==d[i]:
        count+=0
    elif d[i-1]!=d[i]:
        count+=1
if count==0:
    count=1
print(count)

Submission status: Accepted

Solution code:
N = int(input())
d = [int(input()) for i in range(N)]
d=list(set(d))
#d.sort(reverse=True)
print(len(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())
mochi = []
for i in range(n) :
	m = int(input())
	mochi.append(m)
mochi.sort(reverse=True)
count = 1
old = mochi[0]
for new in mochi[1:] :
	if old == new :
		continue
	elif old > new :
		old = new
		count += 1
	else :
		break
print(count)

Submission status: Accepted

Solution code:
from functools import reduce
import math

def main():
    # 文字列の2進数を数値にする
    # '101' → '5'
    # 文字列の頭に'0b'をつけてint()にわたす
    # binary = int('0b'+'101',0)

    # 2進数で立っているbitを数える
    # 101(0x5) → 2
    # cnt_bit = bin(5).count('1')
    
    # N! を求める
    # f = math.factorial(N)

    # N の逆元
    # N_inv = pow(N,MOD-2,MOD)

    # nCr
    # Nの階乗 * rの階乗の逆元 * n-rの階乗の逆元
    
    # 切り捨て
    # 4 // 3
    # 切り上げ
    #-(-4 // 3)
    
    # 初期値用:十分大きい数(100億)
    INF = float("inf")

    # 大きな素数
    MOD = 10**9+7
    
    # 1文字のみを読み込み
    # 入力:2
    # a = input().rstrip()
    # 変数:a='2'
    
    # スペース区切りで標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a, b, c, d = (int(_) for _ in input().split())  
    # 変数:a=2 b=4 c=5 d =7
    
    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a = list(int(_) for _ in input().split())
    # 変数:a = [2, 4, 5, 7]    

    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2457
    # a = list(int(_) for _ in input())
    # 変数:a = [2, 4, 5, 7]    
    N = int(input())
    s = set()
    for i in range(N):
        s.add(int(input()))
    
    print(len(s))
    
if __name__ == '__main__':
    main()

Submission status: Accepted

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

d_unique = list(set(d))

print(len(d_unique))

Submission status: Accepted

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

print(len(d))

Submission status: Accepted

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

d.sort()

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
l=[int(input()) for i in range(n)]
l1=sorted(l,reverse=True)
l2=[]
for i in range(n):
  if i==0:
    l2.append(l1[i])
  else:
    if l1[i]<l1[i-1]:
      l2.append(l1[i])
print(len(l2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

mochi_list = list(set(mochi_list))

print(len(mochi_list))

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(N)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
d = [int(input()) for i in range(n)]
result = {}
for i in d:
  result.setdefault(i, 0)
  result[i] += 1
print(len(result))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(len(a_unique))

Submission status: Accepted

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

    answer = len(list(set(d_list)))

    print(answer)

Submission status: Accepted

Solution code:
n = int(input())

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

print(len(d))

Submission status: Accepted

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

d.sort()

ans = -float('inf')
for i in range(n):
    stack = [d[i]]
    for j in range(i + 1, n):
        if stack[-1] < d[j]:
            stack.append(d[j])
    ans = max(ans, len(stack))

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = [int(input()) for i in range(N)]
new_A = sorted(A)

a = 1
for i in range(0,len(new_A)-1):
    if new_A[i]!=new_A[i+1]:
        a = a+1

print(a)

Submission status: Accepted

Solution code:
# 入力
N=int(input())

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

# 降順にソートする
l.sort()
l.reverse()

# 餅の枚数（必ず1枚は置ける）
c=1

# 下にある餅の直径
d=l[0]

for x in l[1:]:
  # 下にある餅より直径が小さい場合は餅を置ける
  if x<d:
    # 下にある餅の直径の値を更新
    d=x
    # 枚数をインクリメント
    c+=1

# 枚数を出力
print(c)

Submission status: Accepted

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

Submission status: Accepted

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

mochis_unique = list(set(mochis))
print(len(mochis_unique))

Submission status: Accepted

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

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

l_unique = list(set(l))

print(len(l_unique))

Submission status: Accepted

Solution code:
#Kagami Mochi
def bSort(a):
    for i in range(len(a)):
        for j in range(len(a)-1, i, -1):
            if a[j] < a[j-1]:
                a[j], a[j-1] = a[j-1], a[j]

    return a

num = int(input())
mochi = []*num
for i in range(num):
    any = input()
    mochi.append(any)
    
bSort(mochi)

out = mochi[0]
cnt = 1
for i in range(1,num):
    if(out == mochi[i]):
        continue
    else:
        cnt += 1
        out = mochi[i]

print(cnt)

Submission status: Accepted

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

    print(len(set(d)))

main()

Submission status: Accepted

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

    d.sort(reverse = True)
    counter = 0
    dii = 101
    for di in d:
        if di < dii:
            counter += 1
        dii = di

    print(counter)

main()

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    N = int(input())
    l = [int(input()) for i in range(N)]
    # l = [10, 8, 8, 6]
    s = set(l)
    print(len(s))

Submission status: Accepted

Solution code:
list = []

N = int(input())

for i in range(N):
    list.append(int(input()))
    
size = 1

max = max(list)

loop = True

while loop:
    loop = False
    max_temp = 0
    for i in range(N):
        if list[i] < max and list[i] > max_temp:
            max_temp = list[i]
    if max_temp != 0:
        loop = True
        max = max_temp
        size += 1

print(size)

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())
d = [input() for i in range(N)]

d.sort(reverse = True) #降順にソート
counter = 0

for i in range(N):
	if  i < N-1 and d[i] > d[i+1]:
		counter += 1
	elif i == N-1:
		counter += 1

print(counter)

Submission status: Accepted

Solution code:
n = int(input())
num = {}
for i in range(n):
    a = input()
    num[a]=True
print(len(num.keys()))

Submission status: Accepted

Solution code:
n = int(input())
an = []
cnt = 1

for i in range(n):
  an.append(int(input()))
  
sorted_an = sorted(an, reverse=True)

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

print(cnt)

Submission status: Accepted

Solution code:
# 入力割り当て
N = int(input())
i = 0
A = []
for i in range(N):
	A.append(int(input()))
A = sorted(A)

# 隣要素と比較し、同一でなければ加算
j = 0
ans = 1
for j in range(N-1):
	if A[j] != A[j+1]:
		ans += 1

# 結果の表示
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(n):
    a = input()
    if a not in l:
        l.append(a)
print(len(l))

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

cnt = 0
value_before = 0
for i in range(n):
    value = max(d)
    if i == 0:
        value_before = value
        d.remove(value)
        cnt += 1
        continue
    if value_before > value:
        value_before = value
        cnt += 1
    d.remove(value)

print(cnt)

Submission status: Accepted

Solution code:
n = int(input())
a = []
for i in range(n):
  a.append(int(input()))
a.sort(reverse=1)
cnt=1
max=a[0]
for i in range(1, n):
  if a[i]<max:
    cnt+=1
    max=a[i]
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

d.sort()

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

print(cnt)

Submission status: Accepted

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

print(len(set(a_list)))

Submission status: Accepted

Solution code:
n = int(input())

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

ans = set(List)

print(len(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter
N = int(input())
d =[]
for t in range(N):
    d.append(int(input()))

dic = Counter(d)
print(len(dic))

Submission status: Accepted

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

n = int(input())

l = []

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

l.sort()
l = set(l)
print(len(l))