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: Runtime Error

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

for x in range(n + 1):
    for y in range(n + 1):
        for z in range(n + 1 - x - y):
            if x * 10000 + y * 5000 + z * 1000 == sum:
                print(f'{x} {y} {z}')
                exit()

print('-1 -1 -1')

Submission status: Runtime Error

Solution code:
N,Y=map(int,input().split())
x=-1
y=-1
z=-1
for i in range(N+1):
    for j in range(N+1):

        k=N-j-i
        sum = i*10000 + j*5000 + k*1000
        if Y==sum and i+j+k==N:
            x=i
            y=j
            z=k
            break

    else:
        continue
    break
print(str(x)+' '+str(y)+' '+str(z))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def func():
	n = input("")
	bruh = []
	for i in range(n):
		var = input("")
		bruh.append(var)
	bruh = list(dict.fromkeys(bruh))
	return len(bruh)
print(func())

Submission status: Runtime Error

Solution code:
n = input("")
bruh = []
for i in range(n):
	var = input("")
	bruh.append(var)
bruh = list(dict.fromkeys(bruh))
print(len(bruh))

Submission status: Runtime Error

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

count = 0

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

for k in D:
    m = max(D)
    D.remove(max(D))
    count += 1
    if max(D) == 0:
        break
    while m == max(D):
        D.remove(max(D))
    if max(D) == 0:
        break

print("{}".format(count))

Submission status: Runtime Error

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

count = 0

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

for k in D:
    m = max(D)
    D.remove(max(D))
    count += 1
    while m == max(D):
        D.remove(max(D))
    if max(D) == 0:
        break

print("{}".format(count))

Submission status: Runtime Error

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

count = 0

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

for k in D:
    m = max(D)
    D.remove(max(D))
    count += 1 #配列から最大の数を取り出すたびに1数え上げる
    while m == max(D): #さっき取り出した最大の数と同じ数があれば削除
        D.remove(max(D))
    if max(D) == 0: #取り出す正整数がなくなれば終了
        break

print("{}".format(count))

Submission status: Runtime Error

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

count = 0

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

for k in D:
    m = max(D)
    D.remove(max(D))
    count += 1 #配列から最大の数を取り出すたびに1数え上げる
    if max(D) == 0: #取り出す正整数がなくなれば終了
        break
    while m == max(D): #さっき取り出した最大の数と同じ数があれば削除
        D.remove(max(D))

print("{}".format(count))

Submission status: Runtime Error

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

for a in range(n + 1):
    for b in range(n + 1):
        c = n - a - b
        if c >= 0 and  a * 10000 + b * 5000 + c * 1000:
            print(a, b, c)
            exit()
print('-1', '-1', '-1')

Submission status: Runtime Error

Solution code:
import sys
N,Y = map(int,input().split())
        
for A in range(N+1)[::-1]:
  for B in range(N-A+1)[::-1]:
    C=N-A-B
    if (10000*A+5000*B+1000*C==Y):
      print(A,B,C)        
      sys.exit()
print(-1,-1,-1)

Submission status: Runtime Error

Solution code:
import sys
n,y = [ int(i) for i in input().split()]
main_list = input().split()
n = int(main_list[0])
y = int(main_list[1][:-3])

for i in range(n+1):
    for j in range(2):
        if y == i*10 + j*5 + (n-i-j)*1:
            print(" ".join(list(map(str,[i,j,n-i-j]))))
            sys.exit()
print("-1 -1 -1")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
print(len(set(list(N))))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(len(d))

Submission status: Runtime Error

Solution code:
n, y = map(int, input().split())
for i in range(n + 1):
	for j in range(n+1 - i):
		k = n - i - j
		if i *10000 + j * 5000 + k *1000 == y:
			print(i,j,k)
			exit()
			
print('-1 -1 -1')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
lst=[int(input()) for i in range(n)]
lst.sort()
i=0
while i<len(lst)-1:
    while lst[i]<lst[i+1]:
        del lst[i+1]
    i+=1
print(len(lst))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n, total = map(int, input().split())
min = n * 1000
max = n * 10000
if (total > max) or (total < min):
    print('-1 -1 -1')
else:
    min_man = (total - (5000 * n)) // 10000
    n -= min_man
    total -= min_man*10000
    min_sen = (total % 5000) // 1000
    total -= min_sen*1000
    n -= min_sen
    success = False
    for i in range(int(total // 10000)+1):
        if success:
            break
        ii = total - i*10000
        for j in range(int(ii // 5000)+1):
            jj = ii - j*5000
            k = jj//1000
            if i + j + k + min_sen + min_man == n:
                print(str(i+min_man) + ' ' + str(j) + ' ' + str(k+min_sen))
                success = True
                break

    if not success:
        print('-1 -1 -1')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;

int main() {
  int N,ans=1;
  cin >> N;
  vector<int> D(N,0);
  for (int i=0;i<N;i++){
    cin >> D.at(i);
  }
  sort(D.begin(),D.end());
  for (int i=0;i<N-1;i++){
    if (D.at(i)<D.at(i+1)){
      ans++;
    }
  }
  cout << ans << endl;
}

Submission status: Runtime Error

Solution code:
_ = input()

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

Submission status: Runtime Error

Solution code:
n=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: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
import sys

dList = []

for i,d in sys.stdin:
  if i <> 0: #1行目の行数情報はいらないので読み飛ばす
    dList.append(d)

print(len(set(dList)))

Submission status: Runtime Error

Solution code:
import sys

dList = list()

for i,d in sys.stdin:
  if i != 0: #1行目の行数情報はいらないので読み飛ばす
    dList.append(d)

print(len(set(dList)))

Submission status: Runtime Error

Solution code:
import sys

dList = list()

for i,d in sys.stdin:
  if i <> 0: #1行目の行数情報はいらないので読み飛ばす
    dList.append(d)

print(len(set(dList)))

Submission status: Runtime Error

Solution code:
A,B=input().split()
print('YNeos'[int(A+B)**0.5%1!=0::2])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from sys import stdin

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

if n == 1:
    print(1)
    exit

pos=0
max_layer = 1

prev = data[pos]
pos = pos + 1
curr = data[pos]

num_layer = 1

while True:
    if curr < prev:
        num_layer = num_layer + 1
        if max_layer < num_layer:
            max_layer = num_layer
        pos = pos + 1
    elif curr == prev:
        pos = pos + 1
    else:
        pos = pos + 1
        num_layer = 1

    if pos >= n:
        break

    prev = curr
    curr = data[pos]

print(max_layer)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A, B, C, X = [int(input()) for i in range(4)]
res = 0
for a in range(A + 1):
    for b in range(B + 1):
        for c in range(C + 1):
            if a * 500 + b * 100 + c * 50 == X:
                res += 1
print(res)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
ds = list(int(input().split('\n')))

num = set(ds).length()

print(num)

Submission status: Runtime Error

Solution code:
n = int(input())
ds = [int(input()) for _ in range(n)]
flags = [0]*100
for i in ds:
    flags[i]=1
print(sum(flags))
"""
n = int(input())
print(len(set([int(input()) for _ in range(n)])))
"""

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def main():
  N = int(input())
  x = []
  for i in range(N):
    x.append(int(input())
  a = sorted(list(set(x)))
  print(len(a))
             
if __name__ == '__main__':
	main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
l = list(map(int,input().split() for i in range(N))
l = set(l)
print(len(l))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for i in n:
    d = input()
    flag[d] = 1

for i in 101:
    result += flag[i]

print(result)

Submission status: Runtime Error

Solution code:
n = int(input())

hoge = [0 for i in range(0,N)]
for i in range(0,N):
    hoge[i] = int(input())
    

number_set = set(hoge)
print(len(number_set))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

    for _ in range(N):
        D.append(int(input()))

    print(len(set(D)))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

d = list(set(d))

print(length(d))

Submission status: Runtime Error

Solution code:
def main():
    n = int(input())
    r = [input() for i in range(n)]
    r.sort()
    counter = 0
    tmp = 0
    for i in range(n):
        if (r[i] > tmp):
            tmp = r[i]
            counter += 1
    print(counter)
main()

Submission status: Runtime Error

Solution code:

N = int(input())
a = [int(input()) for i in range(N)]
a.sort()
for k in range(N-1):
    if a[k] == a[k+1]:
        a[k] =-1

b=[a[k] for k in range(N) if a[k] != -1]

a.remove(-1)
print(len(b))

Submission status: Runtime Error

Solution code:
d = int(input()))
 
d = set(d)
print(len(d))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

a = []

for i in range(n):
    a.append(list.count(i))
    
print(len(set((a)))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

bucket = {}
for i in range(N):
  if(i in bucket) == False:
    bucket[d[i]] = []
  bucket[d[i]].append(d[i])

print(len(bucket))

Submission status: Runtime Error

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

d.sort()
first = d[0]

for i in range(1, n):
  if first < d[i]:
    res += 1
  first = d[i]
  
print(res)

Submission status: Runtime Error

Solution code:
n = int(input())
d = list(int, input().split())
res = 0

d.sort()
first = d[0]

for i in range(1, n):
  if first > d[i]:
    res += 1
  first = d[i]
  
print(res)

Submission status: Runtime Error

Solution code:
n = int(input())
d = list(int, input().split())
res = 0

d.sort()
first = d[0]

for i in range(1, n):
  if first > range[i]:
    res += 1
  first = range[i]
  
print(res)

Submission status: Runtime Error

Solution code:
n, X = map(int, input().split())
 
for i in range(n+1):
  for j in range(n+1):
    if i+j > n:
      pass
    else:
      k = n-i-j
      otoshi = 10000*i + 5000*j + 1000*k
      if otoshi == X:
        print(i, j, k)
        break
  else:
    continue
  break

Submission status: Runtime Error

Solution code:
n = input()
s = {input() for i in range(3)}

print(len(s))

Submission status: Runtime Error

Solution code:
n = int(input())
data = []
for i in range(n):
  d = int(input())
  data.append(d)
Data = sorted(data)
cnt = 0
tmp = -1
for i in Data:
  if(tmp < Data[i]):
    cnt += 1
    tmp = Data[i]
print(cnt)

Submission status: Runtime Error

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

pre = a[0]
ans = 1
for i in range(1,n):
  if pre < a[n]:
    ans += 1
  pre = a[i]
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,y = map(int, input().strip().split())
a_x, a_y, a_z = -1, -1, -1
for xi in range(n + 1):
  for yi in range(n - xi + 1):
    zi = n - xi - yi
    if 10000*xi + 5000*yi + 1000*zi == y:
      a_x = xi
      a_y = yi
      a_z = zi
      break
 
print(a_x, a_y, a_z)

Submission status: Runtime Error

Solution code:
n, y = map(int, input().split())
for i in range(n + 1):
    for j in range(n - i + 1):
        if i * 10000 + j * 5000 + (n - i - j) * 1000 == y:
            print("{0} {1} {2}".format(i, j, (n - i - j)))
            exit(0)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
li=[int(input()) for i in range(n)]
li_set=list(set(li))        #重複したものを一つにまとめる
print(len(li_s))

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <string>
#include <vector>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)

int ctoi(char);

struct btn
{
    int next;
    int flag;
};

int main()
{
    int N;
    cin >> N;
    vector<int> vec;
    rep(i, N)
    {
        int d;
        cin >> d;
        vec.push_back(d);
    }
    stable_sort(vec.begin(), vec.end());
    int before = -1;
    int ans = 0;
    rep(i, N)
    {
        if (before != vec[i])
        {
            ans++;
        }
        before = vec[i];
    }
    cout << ans << endl;
}

int ctoi(char c)
{
    if (c >= '0' && c <= '9')
    {
        return c - '0';
    }
    return -1;
}

Submission status: Runtime Error

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

for i in a:
  list.append(int(input()))

print(list(set(list)))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

ans = 0
for i in range(100):
    if num[i] > 0:  # num[i] == 1　の方が直観的に理解しやすいかも
        ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
a = [int(input()) for _ in range(n)]
a.sort(reverse = True)
print(len(list(set(a))))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n, y = map(int,input().split())
a = -1
b = -1
c = -1

for i in range(n+1):
    for j in range(n+1):
        if 0 <= n - i - j <= 2000 and y == 10000*i + 5000*j + 1000*(n - i - j):
            a = i
            b = j
            c = n - i -j
            break
print(a,b,c)

Submission status: Runtime Error

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

print(len(set(dl)))

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
a = int(input())
b = []
for i in range(a):
    b.append(input())

c = [0] * (100+1)
for i in b:
    c[i] = i

d = []
for g in c:
    if g != 0:
        d.append(g)

print(len(d))

Submission status: Runtime Error

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

c = [0] * (100)
for i in b:
    c[i] = i

d = []
for g in c:
    if g != 0:
        d.append(g)

print(len(d))

Submission status: Runtime Error

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

c = [0] * (100)
for i in b:
    c[i] = i

print(c)

d = []
for g in c:
    if g != 0:
        d.append(g)

print(len(d))

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
test = input()
a, b, c = map(int, test.split())  # 変数a,b,cにそれぞれN、A、Bをint型にして入力する　
x = []
for i in range(1,a+1):  # list型の変数xに１からNまでの要素を入れる
    x.append(i)


len_x = len(x)  # リスト型の変数xの要素数を獲得

d = 0  # リストの各行の和を入れるための変数
f = []  # 各行の和がA以上B以下の要素を入れるための変数
x = map(str, x)  # リストxの書く要素をstr型に変換

for i in range(len_x):
    e = x[i]           # xのi番目の要素を抽出
    e = list(e)  # xのi番目の要素を一文字ずつのstr型としてリスト型の変数に入れる
    e = map(int, e)  # xのi番目の要素をint型に変換
    e_number = len(e)  # リスト型の変数eの要素数を取得
    d = 0              # 位の合計の判定用の変数
    for g in range(e_number):
        d += e[g]  # 位の合計
    if b <= d <= c:  # 位の合計がA以上B以下ならリストfに要素を追加
        f.append(x[i])
answer = 0  # 条件位合う要素の合計を入れる変数
f = map(int, f)
for h in f:  # 要素に合う要素の合計
    answer += h
print(answer)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

bucket = [0] * N
for j in range(N):
    bucket[ld[j] - 1] += 1

tower = 0

for k in range(N):
    if bucket[k] > 0:
        tower += 1

print(tower)

Submission status: Runtime Error

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

upper = N + 2
bucket = [0] * upper
for j in range(N):
    bucket[ld[j]] += 1

tower = 0

for k in range(1, N+1):
    if bucket[k] > 0:
        tower += 1

print(tower)

Submission status: Runtime Error

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

bucket = [0] * (N + 5)
for j in range(N):
    bucket[ld[j]] += 1

tower = 0

for k in range(1, N+1):
    if bucket[k] > 0:
        tower += 1

print(tower)

Submission status: Runtime Error

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

bucket = [0] * N
for j in range(N):
    bucket[ld[j]] += 1

tower = 0

for k in range(N):
    if bucket[k] > 0:
        tower += 1

print(tower)

Submission status: Runtime Error

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

bucket = [0] * N
for i in range(N):
    bucket[ld[i]] += 1

tower = 0

for k in range(N):
    if bucket[k] > 0:
        tower += 1

print(tower)

Submission status: Runtime Error

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

print(len(set(lst)))

Submission status: Runtime Error

Solution code:
N = int(input())
list_d = [int(input()) for i int range(n)]

print(len(set(lst)))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys

k,s = map(int,input().split())
ans = 0

for x in range(k+1):
	for y in range(k+1):
		if s - (x + y) >= 0 and s - (x + y) <= k:
			ans += 1
print(ans)

Submission status: Runtime Error

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

while b == 0:
    for l in range(N):
        if e[l] < e[l+1]:
            a += 1
        else:
            b += 1

print(a)

Submission status: Runtime Error

Solution code:
N = int(input())
d = [int(input()) for i in range(N)]
a = 0
b = 0
while b == 0:
for l in range(N):
    if d[l]<d[l+1]:
        a += 1
    else:
        b += 1

print(a)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
lst = [int(input()) for x in range(n)]
if n==1:
    print(1)
    break
else:
    split_info = [0] + [i for i in range(1, n) if lst[i-1]<=lst[i]] + [n-1]
    if len(split_info)==2:
        print(n)
        break
    result = [len(lst[split_info[i]:split_info[i+1]]) for i in range(len(split_info)-1)]
print(max(result))

Submission status: Runtime Error

Solution code:
N,Y=map(int,input().split())
#N=a+b+c
#Y=10000*a+5000*b+1000*c
ans=[]
maxA=Y//10000
maxB=Y//5000
maxC=Y//1000
for a in range(maxA+1):
  for b in range(maxB+1):
    for c in range(maxC+1):
      if N==a+b+c:
        if Y==10000*a+5000*b+1000*c:
          ans.append(str(a)+" "+str(b)+" "+str(c))
if len(ans)!=0:
  print(ans[0])
else:
  print(str(-1)+" "+str(-1)+" "+str(-1))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
ans = 1
d = []
for i in range(N):
  d.append(int(input()))
sorted(d,reverse=True)
for i in range(len(d)-1):
  if d[i] == d[i+1]:
    d.remove(d[i+1])
print(len(d))

Submission status: Runtime Error

Solution code:

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

N = int(input())
ans = 0
d = defaultdict(int)
for i in range(N):
	di = int(input())
	if d[di] == 0:
		ans += 1
		d[di] += 1
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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