Problem:


Score : 200 points

Problem Statement

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

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

Constraints

1 ≤ N ≤ 100

1 ≤ d_i ≤ 100

All input values are integers.

Input

Input is given from Standard Input in the following format:

N
d_1
:
d_N

Output

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

Sample Input 1

4
10
8
8
6

Sample Output 1

3

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

Sample Input 2

3
15
15
15

Sample Output 2

1

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

Sample Input 3

7
50
30
50
100
50
80
30

Sample Output 3

4



Sample input:
4
10
8
8
6


Sample output:
3

Submission status: Accepted

Solution code:
n = int(input())

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
cards = list(int(input()) for i in range(n))
results = []
for card in cards:
    if card not in results:
        results.append(card)
print(len(results))

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
d = np.empty(n)
count=1
for i in range(0,n):
    d[i]=int(input())
d=sorted(d)
for i in range(1,n):
    if d[i]!=d[i-1]:
       count=count+1
print(count)

Submission status: Accepted

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

    d_dict = dict()
    for di in d_list:
        d_dict[str(di)] = 1


    print(len(d_dict))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

tmp.sort(reverse = True)

ans = list(dict.fromkeys(tmp))

print(len(ans))

Submission status: Accepted

Solution code:

N = int(input())

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

print(len(sorted(set(d))[::-1]))

Submission status: Accepted

Solution code:
n = input()

s = [0]

for i in range(int(n)):
    t = input()
    if t not in s:
        s.append(t)
        
print(len(s)-1)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
*a,=map(int,open(0));print(len(set(a[1:])))

Submission status: Accepted

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

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

    print(X)  # 段数

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

print(len(mochi_diameter_list))

Submission status: Accepted

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

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

Submission status: Accepted

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

x = len(d)

for i in range(x):
    for j in range(x - 1 - i):
        if d[j] < d[j + 1]:
            tmp = d[j]
            d[j] = d[j + 1]
            d[j + 1] = tmp
            
z = set(d)

print(len(z))

Submission status: Accepted

Solution code:
n = int(input())

r = {}
for i in range(n):
  r[input()]=""

print(len(r))

Submission status: Accepted

Solution code:
n = int(input())

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

r.sort(reverse=True)

dan=1
for i in range(1,r[0]):
  if i in r:
    dan +=1
  
print(dan)

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

nlist = [0] * 101
for i in range(N):
    if(nlist[dlist[i]]==0):
        nlist[dlist[i]] = 1

print(sum(nlist))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin


if __name__ == "__main__":
    _in = [_.rstrip() for _ in stdin.readlines()]
    N = int(_in[0])  # type:int
    d_arr = []
    for i in range(N):
        _ = int(_in[i+1])  # type:int
        d_arr.append(_)
    # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
    cnt = len(set(d_arr))
    ### ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,*b=open(0);print(len(set(b)))

Submission status: Accepted

Solution code:
def resolve():
    # 整数 1 つ
    n = int(input())
    # 整数複数個
    # a, b, c = list(map(int, input().split()))
    # 整数 N 個 (改行区切り)
    D = [int(input()) for i in range(n)]
    # 整数 N 個 (スペース区切り)
    # N = list(map(int, input().split()))
    # 整数 (縦 H 横 W の行列)
    # A = [list(map(int, input().split())) for i in range(H)]

    Dsort = sorted(D)
    cnt = 1
    for i in range(1, n):
        if Dsort[i] > Dsort[i-1]:
            cnt += 1

    print(cnt)
resolve()

Submission status: Accepted

Solution code:
# coding: utf-8
"""this is python work script"""
def solve(input_list):

    list_uniq = set(input_list)
    answer = len(list_uniq)

    return answer

def main():
    """main function"""
    N = int(input())
    list_input = [input().rstrip() for _ in range(N)]

    answer = solve(list_input)
    print(answer)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

def main(n,d):
    d.sort(reverse=True)
    npre=d[0]
    ndan=1
    for i in range(1,n):
        if(d[i]<npre):
            npre=d[i]
            ndan+=1
    
    return ndan

def main2(n,d):
    # 別解
    set_d = set(d)
    return len(set_d)

if __name__=='__main__':
    n,d=readinput()
    ans=main2(n,d)
    print(ans)

Submission status: Accepted

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

def main(n,d):
    d.sort(reverse=True)
    npre=d[0]
    ndan=1
    for i in range(1,n):
        if(d[i]<npre):
            npre=d[i]
            ndan+=1
    
    return ndan

if __name__=='__main__':
    n,d=readinput()
    ans=main(n,d)
    print(ans)

Submission status: Accepted

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

    print(len(d_set))


main()

Submission status: Accepted

Solution code:
n = int(input())
dict = {}
for i in range(n):
  a = int(input())
  dict[a] = 1
print(len(dict))

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,sqrt
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7
#s=input().rstrip()

n=I()
s=[I() for i in range(n)]
print(len(list(set(s))))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

List.sort()
List.reverse()
#print(List)
count = 0

for i in range(len(List)):
  if i==0:
    m = max(List)
    count += 1
    List.remove(m)
  elif m!=max(List):
    m = max(List)
    count += 1
    List.remove(m)
  else:
    List.remove(m)
    continue
    
print(count)

Submission status: Accepted

Solution code:
N = int(input())

L = []
for i in range(N):
  mochi = input()
  if mochi not in L:
    L.append(mochi)
    
print(len(L))

Submission status: Accepted

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

Submission status: Accepted

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

disk_unique = list(set(disk))

print(len(disk_unique))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

A = []

for i in range(N):
	tmp = int(input())
	A.append(tmp)

set1 = set(A)

print(len(set1))

Submission status: Accepted

Solution code:
N = int(input())

myset = set()

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

Submission status: Accepted

Solution code:
n = int(input())

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

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

Submission status: Accepted

Solution code:
N=int(input())
list=[int(input()) for i in range(N)]
list.sort()
m=1
for i in range(N-1):
  if list[i+1]!=list[i]:
    m+=1
print(m)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
lis = []
count = 1
for _ in range(n):
    lis.append(int(input()))
lis.sort()

for i in range(n-1):
    sa = lis[i] - lis[i+1]
    if sa !=0:
        count +=1

print(count)

Submission status: Accepted

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

print(len(set(d)))

Submission status: Accepted

Solution code:
n=int(input())
lis=[]
for i in range(n):
  lis.append(int(input()))
lis.sort()
keep=0
count=0
for i in range(0,n):
  if lis[i]!=keep:
    count+=1
    keep=lis[i]
  else:
    keep=lis[i]
print(count)

Submission status: Accepted

Solution code:
cnt = int(input())
numset= set()

for x in range(cnt):
    size = int(input())
    numset.add(size)

print(len(numset))

Submission status: Accepted

Solution code:
from collections import Counter

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

dict = Counter(d)
print(len(dict.keys()))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

print(len(d))

Submission status: Accepted

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

Submission status: Accepted

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

setA=set(listA)
print(len(setA))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
d=[int(input()) for _ in range(N)]
d=list(set(d))
d.sort(reverse=True)
cnt=1
for i in range(len(d)-1):
    if d[i+1]<d[i]:
        cnt+=1
    else:
        print(cnt)
        exit()
print(cnt)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

d.sort(reverse = True)

count = 0

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop

import collections

n = int(input())
d = [int(input()) for i in range(n)]
d.sort(reverse= True)
cnt = 1
for i in range(n-1):
    if d[i+1] < d[i]:
        cnt+=1
print(cnt)

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 = []
ref = 0
ans = 0

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

d.sort()

for i in d:
    if i > ref:
        ans += 1
        ref = i

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
l = [int(input()) for i in range(n)]
d = {}
for c in l:
    if c not in d:
        d[c] = 0
    d[c] += 1
print(len(d))

Submission status: Accepted

Solution code:
n = int(input())

l = list(set([int(input()) for x in range(n)]))
l.sort(reverse=True)
print(len(l))

Submission status: Accepted

Solution code:
n = int(input())
moti = [int(input()) for i in range(n)]
import collections
moti = collections.Counter(moti)
moti = list(moti.values())
print(len(moti))

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())
mochi = []

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

mochi_set = set(mochi)

print(len(mochi_set))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

d = set(d)

print(len(d))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
#N, K = map(int, input().split())
N=int(input())
# 文字列の入力
#s = input()
d=[]
for i in range(N):
    d.append(int(input()))

#print(d)

print(len(set(d)))

#print(s[0:K-1]+s[K-1].lower()+s[K:N])

Submission status: Accepted

Solution code:
N = int(input())

s = set()

for i in range(N):
    s.add(int(input()))

print(len(s))

Submission status: Accepted

Solution code:
N = int(input())
D = [int(input()) for _ in range(N)]
dict = {}
for i in range(N):
    if D[i] not in dict:
        dict[D[i]] = 1
print(len(dict))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=input()
N=int(N)
d = [0 for i in range(N)]
#dの入力
for i in range(N):
    d[i]=input()
    d[i]=int(d[i])

#処理
d=sorted(d,reverse=True)

count=0
nowd=101

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

print(count)

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
d = [INT() for _ in range(N)]

print(len(set(d)))

Submission status: Accepted

Solution code:
N = int(input())
d = [int(input()) for _ in range(N)]
d.sort()
print(1 + sum(d[i] != d[i + 1] for i in range(N - 1)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

def main():
    # 整数の入力
    N = int(input())
    ls = []
    for i in range(N):
        ls.append(int(input()))

    ls.sort()
    cnt = 0
    tmp_size = 0
    for size in ls:
        if size > tmp_size:
            cnt += 1
            tmp_size = size

    print(cnt)


main()

Submission status: Accepted

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

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())
lst = [0] * (100 + 1)

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

ans = 0
for j in lst:
    ans += j
print(ans)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

cake=[]
for i in range(n):
    if not(rice[i] in cake):
        cake.append(rice[i])

print(len(cake))

Submission status: Accepted

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

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

print(len(set(b)))

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

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 i in range(N)]
print(len(set(d)))

Submission status: Accepted

Solution code:
import sys
import numpy as np

read = sys.stdin.read

n = int(input())
d = np.array(read().split(), np.int64)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
k = []
o = 0

for j in range(N): k.append(int(input()))
l = sorted(k[:])
m = list(set(l))

print(len(m))

Submission status: Accepted

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

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())
li = []
for _ in range(N):
    li.append(int(input()))
mochi = list(set(li))
mochi.sort()
ans = 1
for i in range(len(mochi)):
    if mochi[i-1]<mochi[i]:
        ans += 1
print(ans)

Submission status: Accepted

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

#処理
count=0
now=101
#最大値を探し、現状よりも小さいか判定
for i in range(N):
    temp=max(d)
    if temp<now:
        count+=1
        now=temp
    d[d.index(max(d))]=0

print(count)

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())
d = []
for _ in range(n):
    d.append(int(input()))
count_0 = 1
d = sorted(d)
for i in range(n):
    if i == n-1: break
    if d[i] == d[i+1]: continue
    count_0 += 1

d = sorted(d,reverse=True)
count_1 = 1
for i in range(n):
    if i == n-1: break
    if d[i] == d[i+1]: continue
    count_1 += 1
print(max(count_0,count_1))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

print(len(set(dList)))

Submission status: Accepted

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

Submission status: Accepted

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

print(len(set(l)))

Submission status: Accepted

Solution code:
import sys
## io
IS = lambda: sys.stdin.readline().rstrip()
II = lambda: int(IS())
MII = lambda: list(map(int, IS().split()))
MIIZ = lambda: list(map(lambda x: x-1, MII()))
## dp
INIT_VAL = 0
MD2 = lambda d1,d2: [[INIT_VAL]*d2 for _ in range(d1)]
MD3 = lambda d1,d2,d3: [MD2(d2,d3) for _ in range(d1)]
## math
DIVC = lambda x,y: -(-x//y)
DIVF = lambda x,y: x//y

def main():
    n = II()
    dd = [II() for _ in range(n)]
    print(len(set(dd)))

if __name__ == '__main__':
    main()

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

print(len(set(a)))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N,*D=open(0);print(len(set(D)))

Submission status: Accepted

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

i = set(d)

print(len(i))

Submission status: Accepted

Solution code:
N=int(input())

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

print(len(answer_set))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

from collections import Counter

N = int(input())
dlist = []
for i in range(1,N+1):
  dlist.append(input())

ddict = Counter(dlist)
print(len(ddict))

Submission status: Accepted

Solution code:
from collections import Counter

N = int(input())
dlist = []
for i in range(1, N + 1):
    dlist.append(input())

ddict = Counter(dlist)
print(len(ddict))

Submission status: Accepted

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

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

print(len(seta))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#bA
N = int(input())
d = [int(input()) for i in range(N)]
print(len(set(d))) #セット型は要素が重複しないのを利用

Submission status: Accepted

Solution code:
#7
N = int(input())
d = [int(input()) for i in range(N)]
d.sort(reverse=True)
count = 1
for i in range(N-1):
    if d[i] > d[i+1]:
        count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

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

print(len(set(data)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
D = [int(input()) for i in range(N)]
sorted_D = sorted(D, reverse=True)

top = sorted_D[0]
result = 1

for mochi in sorted_D:
    if top > mochi:
        top = mochi
        result += 1

print(result)

Submission status: Accepted

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

print(len(list(set(l))))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections

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

c = collections.Counter(l)

print(len(c))

Submission status: Accepted

Solution code:
n=int(input())
b=[0]*105
for _ in range(n):
    v=int(input())
    b[v]+=1

cnt=0
for i in range(105):
    if b[i]>0:
        cnt+=1

print(cnt)

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:
import sys
input=sys.stdin.readline
#from collections import defaultdict
#d = defaultdict(int)
#import fractions
#import math
#import collections
#from collections import deque
#from bisect import bisect_left
#N = int(input())
#A = list(map(int,input().split()))
#S = list(input())
#S.remove("\n")
#N,M = map(int,input().split())
#S,T = map(str,input().split())
#A = [int(input()) for _ in range(N)]
#S = [input() for _ in range(N)]
#A = [list(map(int,input().split())) for _ in range(N)]
import collections
N = int(input())
d = [int(input()) for _ in range(N)]
c = collections.Counter(d)
print(len(c))

Submission status: Accepted

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

n=0
d.sort(reverse=True)
dd=[]
dd.append(d[0])
for i in range(N):
    if d[i]<min(dd):
        dd.append(d[i])

n=len(dd)
print(n)

Submission status: Accepted

Solution code:
import sys, math
sys.setrecursionlimit(10 ** 6)
from collections import deque, defaultdict, Counter
from operator import itemgetter

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
l = list()
for n in range(N):
    l.append(int(input()))
d = {}
for i in l:
    d[i] = 1
print(len(d))

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:
N = int(input())
l = list()
for n in range(N):
    l.append(int(input()))
l.sort(reverse=True)
total = 0
res = 101
for i in l:
    if res > i:
        total += 1
        res = i
print(total)

Submission status: Accepted

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

print(len(set(n_list)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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