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:
#!/usr/bin/env python3

import sys
# import time
# import math
# import numpy as np
# import scipy.sparse.csgraph as cs            # csgraph_from_dense(ndarray, null_value=inf), bellman_ford(G, return_predecessors=True), dijkstra, floyd_warshall
# import random                                # random, uniform, randint, randrange, shuffle, sample
# import string                                # ascii_lowercase, ascii_uppercase, ascii_letters, digits, hexdigits
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from datetime import date, datetime          # date.today(), date(year,month,day) => date obj; datetime.now(), datetime(year,month,day,hour,second,microsecond) => datetime obj; subtraction => timedelta obj
# from datetime.datetime import strptime       # strptime('2019/01/01 10:05:20', '%Y/%m/%d/ %H:%M:%S') returns datetime obj
# from datetime import timedelta               # td.days, td.seconds, td.microseconds, td.total_seconds(). abs function is also available.
# from copy import copy, deepcopy              # use deepcopy to copy multi-dimentional matrix without reference
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict (e.g. list is not allowed)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product, permutations  # product(iter, repeat=n), permutations(iter[,r])
# from itertools import combinations, combinations_with_replacement
# from itertools import accumulate             # accumulate(iter[, f])
# from operator import itemgetter              # itemgetter(1), itemgetter('key')
# from fractions import gcd                    # for Python 3.4 (previous contest @AtCoder)



def main():
    mod = 1000000007                # 10^9+7
    inf = float('inf')              # sys.float_info.max = 1.79...e+308
    # inf = 2 ** 64 - 1             # (for fast JIT compile in PyPy) 1.84...e+19
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    n = ii()
    L = [ii() for _ in range(n)]
    print(len(list(set(L))))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
#Kagami Mochi
n=int(input())
s=[input() for _ in range(n)]

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

Submission status: Accepted

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

e = set(d)

print(len(e))

Submission status: Accepted

Solution code:
import numpy as np
import scipy.sparse as sps
import scipy.misc as spm
import collections as col
import functools as func
import itertools as ite
import fractions as frac
import math as ma
import cmath as cma
import copy as cp
import sys
def sinput(): return sys.stdin.readline().strip()
def iinput(): return int(sinput())
def imap(): return map(int, sinput().split())
def fmap(): return map(float, sinput().split())
def iarr(n=0):
    if n: return [0 for _ in range(n)]
    else: return list(imap())
def farr(): return list(fmap())
def sarr(n=0):
    if n: return ["" for _ in range(n)]
    else: return sinput().split()
def barr(n): return [False for _ in range(n)]
sys.setrecursionlimit(10**7)
MOD = 10**9 + 7; EPS = sys.float_info.epsilon
PI = np.pi; EXP = np.e; INF = np.inf

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

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

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:
d = {}
for i in range(int(input())):
  k = int(input())
  d[k] = 1
  
print(len(d.keys()))

Submission status: Accepted

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

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:
arr = []

N = int(input())
for i in range(0,N):
  D = int(input())
  arr.append(D)

arr = sorted(set(arr))
print(len(arr))

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

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

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

print(len(set(Mochi)))

Submission status: Accepted

Solution code:
n = int(input())
list_d = []
for i in range(n):
    list_d.append(int(input()))
# arranged_list_d = sorted(list_d)
set_list_d = set(list_d)
print(len(set_list_d))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline

def main():
    n = int(read())
    se = set()
    for i in range(n):
        a = int(read())
        se.add(a)
    print(len(se))
if __name__ == '__main__':
    main()

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

Submission status: Accepted

Solution code:
N = int(input())
D = [int(input()) for i in range(N)]
D.sort(reverse=True)
ans = 0
pre_d = float('inf')
for d in D:
  if d < pre_d:
    ans += 1
    pre_d = 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:
#!/usr/bin python3
# -*- coding: utf-8 -*-

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# B - Kagami Mochi
N = int(input())
MOCHI=[]
for n in range(N):
    MOCHI.append(int(input()))
print(len(set(MOCHI)))

Submission status: Accepted

Solution code:
import sys


def main(lines):
    print(len(set(lines[1:])))


if __name__ == '__main__':
    lines = []
    for l in sys.stdin:
        lines.append(l.rstrip('\r\n'))
    main(lines)

Submission status: Accepted

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

for i in range(N):
    
    c.append(int(input()))
    
print(len(set(c)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

mochi_kai = sorted(list(set(mochi)))

print(len(mochi_kai))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

li = []
ans = 0
for i in range(n):
    tmp = input()
    if tmp in li:
        continue
    else:
        li.append(tmp)
        ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

answer = N
s = sorted(d)

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


print(answer)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

n = int(input())
array = []

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

array = set(array)

print(len(array))

Submission status: Accepted

Solution code:

inf = 10 ** 15
mod = 10 ** 9 + 7

n = int(input())
d = [list(map(int, input().split())) for i in range(n)]
d.sort()
pre = 0
count= 0
for num in d:
    if pre != num:
        count+=1
    pre = num
print(count)

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

print(len(set(d)))

Submission status: Accepted

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

d = list(set(d_input))
d.sort(reverse=True)
kagamimochi = len(d)

print(kagamimochi)

Submission status: Accepted

Solution code:
N = int(input())
d_list = [int(input()) for i in range(N)]
d_list = sorted(list(set(d_list)), reverse=True)

print(len(d_list))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(4100000)
import math
INF = 10**9

def main():
    n = int(input())
    D = []
    for _ in range(n):
        D.append(int(input()))

    D_set = set(D)
    print(len(D_set))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

n = int(readline())
d = [int(readline()) for _ in range(n)]
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 = set(d)

print(len(d))

Submission status: Accepted

Solution code:
X = len(set(map(int, (input() for _ in range(int(input()))))))
print(X)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Problem: https://atcoder.jp/contests/abc085/tasks/abc085_b
# Python 2nd Try

import sys
# from collections import defaultdict
# import heapq,copy
# from collections import deque
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def solver(riceCakesList):
    result = 0
    # print("LIST={}".format(riceCakesList))
    # algorithm
    result = len(set(riceCakesList))
    return result
if __name__ == "__main__":
    N = II()
    DI = list()
    for _ in range(N):
        DI.append(II())
    print("{}".format(solver(DI)))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(readline())
s = set()

for _ in range(N):
    d = int(readline())
    s.add(d)

print(len(s))

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

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
#from math import gcd
import bisect
from collections import defaultdict
from collections import deque
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]

######OUTPUT######
def Yes(): print("Yes"); return
def No(): print("No"); return

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1:
    arr.append([temp, 1])
  if arr==[]:
    arr.append([n, 1])
  return arr

#####MakeDivisors######
def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors

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

#####BitCount#####
def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count

#####ChangeBase#####
def Base_10_to_n(X, n):
  if X//n:
    return Base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def Base_n_to_10(X, n):
  return sum(int(str(X)[-i])*n**i for i in range(len(str(X))))

#####IntLog#####
def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count

#############
# Main Code #
#############

N = inputI()
d = inputILs(N)

print(len(set(d)))

Submission status: Accepted

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

print(len(A))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input_methods=['clipboard','file','key']
using_method=0
input_method=input_methods[using_method]

tin=lambda : map(int, input().split())
lin=lambda : list(IN())
mod=1000000007

#+++++

def main():
	n = int(input())
	#b , c = tin()
	#s = input()
	ss=set()
	for _ in range(n):
		c = int(input())
		ss.add(c)
	print(len(ss))
	
	
#+++++
isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

#print(mochi)
print(len(mochi))

Submission status: Accepted

Solution code:
n = int(input())
steps = list()
for pivot in range(n):
  steps.append(int(input()))

steps = set(steps)

print(len(steps))

Submission status: Accepted

Solution code:
n = int(input())
d = list(int(input()) for _ in range(n))
d.sort(reverse=True)

r = []
cnt = 0
for i in d:
  if cnt == 0:
    r.append(i)
    cnt += 1
  else:
    if r[-1] == i:
      continue
    else:
      r.append(i)
      cnt += 1
print(cnt)

Submission status: Accepted

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

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:
#!/usr/bin/env python3
import sys


def solve(N: int, d: "List[int]"):
    d = set(sorted(d)) # uniq 処理
    return(len(d))
    

# Generated by 1.1.7.1 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]"
    print(solve(N, d))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

prev = 0
ans = 0
for i in d_list:
  if prev < i:
    ans += 1
  prev = i
  
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
d = []
for d_i in range(n):
  d.append(int(input()))
  
count = 0
pre_max = -1
max = -1

for i in range(n): 
  for j in d:
    if j > max:
      max = j
      
  d[d.index(max)] = 0
      
  if pre_max == -1:
    count += 1
    
  elif max < pre_max:
    count += 1
    
  pre_max = max
  max = -1
  
print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

d.sort(reverse=True)
cnt = 0
for i in range(N):
    if i==0:
        cnt += 1
        continue
    elif d[i]==d[i-1]:
        continue
    else:
        cnt += 1

print(cnt)

Submission status: Accepted

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

sort_d = list(set(d))
max_number = max(sort_d)

count = 0
for i in sort_d:
  if max_number > i:
    count+=1
print(count+1)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
lists = [0]*100
for i in range(n):
    num = int(input()) - 1
    lists[num] += 1
count = 0
for i in lists:
    if i > 0:
        count += 1
print(count)

Submission status: Accepted

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

result = 0
maxMochi = 0
for tmp in range(num):
    if max(mochi) == maxMochi:
        mochi.pop(mochi.index(max(mochi)))
        continue

    maxMochi = max(mochi)
    result += 1
    mochi.pop(mochi.index(max(mochi)))

print(result)

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:
mochis = int(input())
mochi_diameter = [int(input()) for i in range(mochis)]
mochi_fixed = list(set(mochi_diameter))
ans = len(mochi_fixed)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

count = 0
for i in range(N):
  if i==0:
    count += 1
  elif A[i] != A[i-1]:
    count += 1
  else:
    count += 0
 
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
d_list = []
for i in range(n):
    d = int(input())
    d_list.append(d)
d_array = np.array(d_list)
d_array_sort = np.sort(d_array)[::-1]
count = 0
maximum = 0
for i, d in enumerate(d_array_sort):
    if i == 0:
        maximum = d
        count += 1
    elif d < maximum:
        maximum = d
        count += 1
print(count)

Submission status: Accepted

Solution code:
i=int(input())
import sys
ans=[i.rstrip() for i in sys.stdin.readlines()]
print(len(set(ans)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
D = [int(input()) for i in range(N)]
D.sort(reverse=True)
current = 101
count = 0
for d in D:
  if current > d:
    current = d
    count += 1
print(count)

Submission status: Accepted

Solution code:
import sys
import math
import bisect

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

dic = {}

for i in num_list:
    dic[i] = 1

print(len(dic.keys()))

Submission status: Accepted

Solution code:
# Problem https://atcoder.jp/contests/abc085/tasks/abc085_b
# Python  1st Try
import sys
# from collections import defaultdict
# import heapq,copy
# from collections import deque
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def solver(cakeTotal, riseSet):
    RISE_MAXSIZE = 100
    result = 0
    # print("riseset={}".format(riseSet))
    bucketList = [0] * RISE_MAXSIZE
    for p in range(0,cakeTotal, +1): # p = position
        weigh = riseSet[p]
        bucketList[weigh-1] = bucketList[weigh-1] + 1
    for p in range(RISE_MAXSIZE):
        if 0 < bucketList[p]:
            result = result + 1
    return result
if __name__ == "__main__":
    N = II()
    DI = list()
    for _ in range(0, N):
        DI.append(II())
    print("{}".format(solver(N, DI)))

Submission status: Accepted

Solution code:
N = int(input())
d = sorted([int(input()) for i in range(N)])
c = 1
for i in range(N - 1):
    if d[i] < d[i + 1]:
        c += 1
print(c)

Submission status: Accepted

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

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:
import numpy as np

n = int(input())
d = [int(input()) for _ in range(n)]
i0 = 101
count = 0
d.sort()
d.reverse()
for i in range(0, n):
    # print(i, d[i])
    if i0 > d[i]:
        count += 1
        i0 = d[i]

print(count)

Submission status: Accepted

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

for i in range(n):
    if d[i] not in ans:
        ans.append(d[i])

print(len(ans))

Submission status: Accepted

Solution code:
n = int(input())
d = list()
for a in range(0, n):
    d.append(int(input()))

d.sort(reverse=True)

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

Submission status: Accepted

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

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())
d = list()
for a in range(0, n):
    d.append(int(input()))

d.sort(reverse=True)
before = d[0]
ans = 0

for a in range(1, n):
    if before > d[a]:
        ans += 1
    before = d[a]

print(ans+1)

Submission status: Accepted

Solution code:
N = int(input())
d = sorted([int(input()) for _ in range(N)])[::-1]
result = 1
for i in range(1,N):
    if d[i] < d[i-1]:
        result +=1
print(result)

Submission status: Accepted

Solution code:

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

d.sort()
cnt = 1
for i in range(1,n):
  if d[i] > d[i-1]:
    cnt += 1
print(cnt)

Submission status: Accepted

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

print(len(set(d_ls)))

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

print(len(set(list)))

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

ans  = 1
d.sort()
c = d[0]
for i in range(1, n):
  if c < d[i]:
    ans += 1
  c = d[i]
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())
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)]

print(len(sorted(set(D))))

Submission status: Accepted

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

Submission status: Accepted

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

print(len(d))

Submission status: Accepted

Solution code:
x = int(input())

list = [int(input()) for _ in range(x)]
list = set(list)

print(len(list))

Submission status: Accepted

Solution code:
"""
蟻本2-4-2 二分探索木の例題
"""

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

print(len(set(D)))

Submission status: Accepted

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

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

d.sort()
count = 1

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

print(count)

Submission status: Accepted

Solution code:
import sys
n = int(sys.stdin.readline())
dictionary = {}
for i in range(110):
    dictionary[i] = 0
for line in sys.stdin:
    num = int(line.rstrip("\n"))
    dictionary[num] += 1
mochi = 0
for i in range(110):
    if dictionary[i] > 0:
        mochi += 1
print(mochi)

Submission status: Accepted

Solution code:
import sys
n = int(sys.stdin.readline())
l = [int(line.rstrip("\n")) for line in sys.stdin]
print(len(set(l)))

Submission status: Accepted

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

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

Submission status: Accepted

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