Problem:


Score : 300 points

Problem Statement

In AtCoder, a person who has participated in a contest receives a color, which corresponds to the person's rating as follows:  

Rating 1-399 : gray

Rating 400-799 : brown

Rating 800-1199 : green

Rating 1200-1599 : cyan

Rating 1600-1999 : blue

Rating 2000-2399 : yellow

Rating 2400-2799 : orange

Rating 2800-3199 : red

Other than the above, a person whose rating is 3200 or higher can freely pick his/her color, which can be one of the eight colors above or not.

Currently, there are N users who have participated in a contest in AtCoder, and the i-th user has a rating of a_i.

Find the minimum and maximum possible numbers of different colors of the users.  

Constraints

1 ≤ N ≤ 100

1 ≤ a_i ≤ 4800

a_i is an integer.

Input

Input is given from Standard Input in the following format:

N
a_1 a_2 ... a_N

Output

Print the minimum possible number of different colors of the users, and the maximum possible number of different colors, with a space in between.  

Sample Input 1

4
2100 2500 2700 2700

Sample Output 1

2 2

The user with rating 2100 is "yellow", and the others are "orange". There are two different colors.  

Sample Input 2

5
1100 1900 2800 3200 3200

Sample Output 2

3 5

The user with rating 1100 is "green", the user with rating 1900 is blue and the user with rating 2800 is "red".

If the fourth user picks "red", and the fifth user picks "blue", there are three different colors. This is one possible scenario for the minimum number of colors.

If the fourth user picks "purple", and the fifth user picks "black", there are five different colors. This is one possible scenario for the maximum number of colors.  

Sample Input 3

20
800 810 820 830 840 850 860 870 880 890 900 910 920 930 940 950 960 970 980 990

Sample Output 3

1 1

All the users are "green", and thus there is one color.



Sample input:
4
2100 2500 2700 2700


Sample output:
2 2

Submission status: Wrong Answer

Solution code:
N = input()
a = [int(i) for i in input().split()]
scores = [0,0,0,0,0,0,0,0]
score8 = 0
for i in a:
    checknum = int(i/400)
    if checknum > 7:
        score8 += 1
    else:
        scores[checknum] = 1
score1to7 = sum(scores)
saidai = min(score1to7 + score8, 8)
saisho = min(max(score1to7, score8), 8)
print(str(saisho) + " " + str(saidai))

Submission status: Wrong Answer

Solution code:
N = input()
a = [int(i) for i in input().split()]
scores = [0,0,0,0,0,0,0,0]
score8 = 0
for i in a:
    checknum = int(i/400)
    if checknum > 7:
        score8 += 1
    else:
        scores[checknum] = 1
print(min([sum(scores) + score8,8]))

Submission status: Wrong Answer

Solution code:
N = input()
a = []
a.append(map(int, raw_input().split()))

a=a[0]

c=[0,0,0,0,0,0,0,0]

free=0

for i in a:
    if 1<=i and i<=399:
        c[0]=1
    elif 400<=i and i<=799:
        c[1]=1
    elif 800<=i and i<=1199:
        c[2]=1
    elif 1200<=i and i<=1599:
        c[3]=1
    elif 1600<=i and i<=1999:
        c[4]=1
    elif 2000<=i and i<=2399:
        c[5]=1
    elif 2400<=i and i<=2799:
        c[6]=1
    elif 2800<=i and i<=3199:
        c[7]=1
    elif 3200<=i:
        free+=1

ma=sum(c)+free
if ma>8:
    ma=8

mi=sum(c)
if mi<1:
    mi=1


print("{} {}".format(mi, ma))

Submission status: Wrong Answer

Solution code:
N = input()
a = []
a.append(map(int, raw_input().split()))

a=a[0]

c=[0,0,0,0,0,0,0,0]

free=0

for i in a:
    if 1<=i and i<=399:
        c[0]=1
    elif 400<=i and i<=799:
        c[1]=1
    elif 800<=i and i<=1199:
        c[2]=1
    elif 1200<=i and i<=1599:
        c[3]=1
    elif 1600<=i and i<=1999:
        c[4]=1
    elif 2000<=i and i<=2399:
        c[5]=1
    elif 2400<=i and i<=2799:
        c[6]=1
    elif 2800<=i and i<=3199:
        c[7]=1
    elif 3200<=i:
        free+=1

print("{} {}".format(max(1, sum(c)), min(8, sum(c)+free)))

Submission status: Wrong Answer

Solution code:
N = input()
a = []
a.append(map(int, raw_input().split()))

a=a[0]

c=[0,0,0,0,0,0,0,0]

free=0

for i in a:
    if 1<=i and i<=399:
        c[0]=1
    elif 400<=i and i<=799:
        c[1]=1
    elif 800<=i and i<=1199:
        c[2]=1
    elif 1200<=i and i<=1599:
        c[3]=1
    elif 1600<=i and i<=1999:
        c[4]=1
    elif 2000<=i and i<=2399:
        c[5]=1
    elif 2400<=i and i<=2799:
        c[6]=1
    elif 2800<=i and i<=3199:
        c[7]=1
    elif 3200<=i:
        free+=1

print("{} {}".format(sum(c), min(8, sum(c)+free)))

Submission status: Wrong Answer

Solution code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import math

N, = map(int, sys.stdin.readline().rstrip().split())
a_list = list(map(int, sys.stdin.readline().rstrip().split()))

def score_index(score):
    if score < 400:
        return 0
    if score < 800:
        return 1
    if score < 1200:
        return 2
    if score < 1600:
        return 3
    if score < 2000:
        return 4
    if score < 2400:
        return 5
    if score < 2800:
        return 6
    if score < 3200:
        return 7
    else:
        raise Exception()



superplayers = 0
counts = set()
for a in a_list:
    if a < 3200:
        counts.add(score_index(a))
    else:
        superplayers += 1

print("{} {}".format(
    min(len(counts), 1),
    len(counts) + superplayers
))

exit(0)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import math

N, = map(int, sys.stdin.readline().rstrip().split())
a_list = list(map(int, sys.stdin.readline().rstrip().split()))

def score_index(score):
    if score < 400:
        return 0
    if score < 800:
        return 1
    if score < 1200:
        return 2
    if score < 1600:
        return 3
    if score < 2000:
        return 4
    if score < 2400:
        return 5
    if score < 2800:
        return 6
    if score < 3200:
        return 7
    else:
        raise Exception()



superplayers = 0
counts = set()
for a in a_list:
    if a < 3200:
        counts.add(score_index(a))
    else:
        superplayers += 1

print("{} {}".format(
    len(counts),
    len(counts) + superplayers
))

exit(0)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import math

N, = map(int, sys.stdin.readline().rstrip().split())
a_list = list(map(int, sys.stdin.readline().rstrip().split()))

def score_index(score):
    if score < 400:
        return 0
    if score < 800:
        return 1
    if score < 1200:
        return 2
    if score < 1600:
        return 3
    if score < 2000:
        return 4
    if score < 2400:
        return 5
    if score < 2800:
        return 6
    if score < 3200:
        return 7
    else:
        raise Exception()



superplayers = 0
counts = set()
for a in a_list:
    if a < 3200:
        counts.add(score_index(a))
    else:
        superplayers += 1

print("{} {}".format(
    len(counts),
    min(len(counts) + superplayers, 8)
))

exit(0)

Submission status: Wrong Answer

Solution code:
N=input()
def waru(num):
    return int(num)//400
a = list(map(waru, input().split()))
b = []
num = 0
for i in a:
    if i >= 8:
        b.append(i)
minu = len(set(a)) - len(set(b))
if min==0:
    min = 1

print(minu, len(b)+minu)

Submission status: Wrong Answer

Solution code:
N=input()
def waru(num):
    return int(num)//400
    
a = list(map(waru, input().split()))
b = []
num = 0
for i in a:
    if i >= 8:
        b.append(i)
min = len(set(a)) - len(set(b))

print(min, len(b)+min)

Submission status: Wrong Answer

Solution code:
N=input()
def waru(num):
    return int(num)//400
    
a = list(map(waru, input().split()))
num = 0
for i in a:
    num+=1 if i >= 8 else 0
min = len(set(a))-num+1

print(min, num+min)

Submission status: Wrong Answer

Solution code:
N=input()
def waru(num):
    return int(num)//400
    
a = list(map(waru, input().split()))
num = 0
for i in a:
    num+=1 if i >= 8 else 0
min = len(set(a))-num if num > 0 else len(set(a))

print(min, num+min)

Submission status: Wrong Answer

Solution code:
N=input()
def waru(num):
    return int(num)//400
    
a = list(map(waru, input().split()))
num = 0
for i in a:
    num+=1 if i >= 8 else 0
min = len(set(a))-1 if num > 0 else len(set(a))

print(min, num+min)

Submission status: Wrong Answer

Solution code:
def hantei(num):
    if num>0 and num<400:
        return 1
    elif num>=400 and num<800:
        return 2
    elif num>=800 and num<1200:
        return 3
    elif num>=1200 and num<1600:
        return 4
    elif num>= 1600 and num<2000:
        return 5
    elif num>=2000 and num<2400:
        return 6
    elif num>=2400 and num<2800:
        return 7
    elif num>=2800 and num<3200:
        return 8
    elif num<=3200:
        return 0

N = input()
l = input().split()
tmp_list = []
num=0
for i in l:
    hoge = hantei(int(i))
    if hoge == 0:
        num+=1
    else:
        tmp_list.append(hoge)
min = len(set(tmp_list))
max = min + num
print(min, max)

Submission status: Wrong Answer

Solution code:
def hantei(num):
    if num>0 and num<400:
        return 1
    elif num>=400 and num<800:
        return 2
    elif num>=800 and num<1200:
        return 3
    elif num>=1200 and num<1600:
        return 4
    elif num>= 1600 and num<2000:
        return 5
    elif num>=2000 and num<2400:
        return 6
    elif num>=2400 and num<2800:
        return 7
    elif num>=2800 and num<3200:
        return 8
    else:
        return 0

N = input()
l = input().split()
tmp_list = []
num=0
for i in l:
    hoge = hantei(int(i))
    if hoge == 0:
        num+=1
    else:
        tmp_list.append(hoge)
min = len(set(tmp_list))
max = min + num
print(min, max)

Submission status: Wrong Answer

Solution code:
N=input()
nlist= [int(l) for l in raw_input().split(' ')]

rate= [0,0,0,0,0,0,0,0]
up = 0
for n in nlist:
	if n/400>=8:
		up += 1
	else:
		rate[n/400]=1
print max(1,sum(rate)), min(sum(rate)+up,8)

Submission status: Wrong Answer

Solution code:
N=input()
nlist= [int(l) for l in raw_input().split(' ')]

rate= [0,0,0,0,0,0,0,0]
max = 0
for n in nlist:
	if n/400>=8:
		max += 1
	else:
		rate[n/400]=1

if sum(rate)==0:
	print(1),
else:
	print(sum(rate)),
if sum(rate)+max > 8:
	print(8)
else:
	print(sum(rate)+max)

Submission status: Wrong Answer

Solution code:
N=input()
nlist= [int(l) for l in raw_input().split(' ')]

rate= [0,0,0,0,0,0,0,0]
max = 0
for n in nlist:
	if n/400>=8:
		max += 1
	else:
		rate[n/400]=1

print(sum(rate)),
if sum(rate)+max > 8:
	print(8)
else:
	print(sum(rate)+max)

Submission status: Wrong Answer

Solution code:
n = input()
a_s = map(lambda x: int(x), raw_input().split())
s = set([])
strong_n = 0
for a in a_s:
    rate = a/400
    if rate >= 8:
        strong_n+=1
    else:
        s.add(rate)
print len(s), len(s)+strong_n

Submission status: Wrong Answer

Solution code:
n = input()
a_s = map(lambda x: int(x), raw_input().split())
s = set([])
strong_n = 0
for a in a_s:
    rate = a/400
    if rate >= 8:
        strong_n+=1
    else:
        s.add(rate)
print len(s), min(len(s)+strong_n, 8)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Here your code !
input()
p =[int(x) for x in input().split(" ")]

r1_399 = 0
r400_799 = 0
r800_1199 = 0
r1200_1599 = 0
r1600_1999 = 0
r2000_2399 = 0
r2400_2799 = 0
r2800_3199 = 0
over3200 = 0

for i in p:
    if 1 <= i <400:
        r1_399 +=1
    elif 400 <= i <800:
        r400_799 +=1
    elif 800 <= i <1200:
        r800_1199 +=1
    elif 1200 <= i <1600:
        r1200_1599 +=1
    elif 1600 <= i <2000:
        r1600_1999 +=1
    elif 2000 <= i <2400:
        r2000_2399 += 1
    elif 2400 <= i < 2800:
        r2400_2799 += 1
    elif 2800<= i <3199:
        r2800_3199 += 1
    elif 3200<= i:
        over3200 += 1
num = 0
for i in [r1_399,r400_799,r800_1199,r1200_1599,r1600_1999,r2000_2399,r2400_2799,r2800_3199]:
    if i > 0:
        num+=1

nummax = num + over3200

if num == 0:
    num +=1
print(str(num)+" " +str(nummax))

Submission status: Wrong Answer

Solution code:
input()
p =[int(x) for x in input().split(" ")]

r1_399 = 0
r400_799 = 0
r800_1199 = 0
r1200_1599 = 0
r1600_1999 = 0
r2000_2399 = 0
r2400_2799 = 0
r2800_3199 = 0
over3200 = 0

for i in p:
    if 1 <= i <400:
        r1_399 +=1
    elif 400 <= i <800:
        r400_799 +=1
    elif 800 <= i <1200:
        r800_1199 +=1
    elif 1200 <= i <1600:
        r1200_1599 +=1
    elif 1600 <= i <2000:
        r1600_1999 +=1
    elif 2000 <= i <2400:
        r2000_2399 += 1
    elif 2400 <= i < 2800:
        r2400_2799 += 1
    elif 2800<= i <3199:
        r2800_3199 += 1
    elif 3200<= i:
        over3200 += 1
num = 0
for i in [r1_399,r400_799,r800_1199,r1200_1599,r1600_1999,r2000_2399,r2400_2799,r2800_3199]:
    if i > 0:
        num+=1

nummax = num + over3200
if nummax>8:
    nummax = 8
if num == 0:
    num +=1
print(str(num)+" " +str(nummax))

Submission status: Wrong Answer

Solution code:
input()
p =[int(x) for x in input().split(" ")]

r1_399 = 0
r400_799 = 0
r800_1199 = 0
r1200_1599 = 0
r1600_1999 = 0
r2000_2399 = 0
r2400_2799 = 0
r2800_3199 = 0
over3200 = 0

for i in p:
    if 1 <= i <400:
        r1_399 +=1
    elif 400 <= i <800:
        r400_799 +=1
    elif 800 <= i <1200:
        r800_1199 +=1
    elif 1200 <= i <1600:
        r1200_1599 +=1
    elif 1600 <= i <2000:
        r1600_1999 +=1
    elif 2000 <= i <2400:
        r2000_2399 += 1
    elif 2400 <= i < 2800:
        r2400_2799 += 1
    elif 2800<= i <3199:
        r2800_3199 += 1
    elif 3200<= i:
        over3200 += 1
num = 0
for i in [r1_399,r400_799,r800_1199,r1200_1599,r1600_1999,r2000_2399,r2400_2799,r2800_3199]:
    if i > 0:
        num+=1

nummax = num + over3200
if nummax>8:
    nummax = 8
print(str(num)+" " +str(nummax))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = [ int(i) for i in input().split() ]
c = [ 0 for _ in range(8)]
cou = 0

for i in range(n):
    keep=a[i]

    if 1<= keep <=399:
        c[0]=1
    elif 400<= keep <=799:
        c[1]=1
    elif 800<= keep <=1199:
        c[2]=1
    elif 1200<= keep <=1599:
        c[3]=1
    elif 1600<= keep <=1999:
        c[4]=1
    elif 2000<= keep <=2399:
        c[5]=1
    elif 2400<= keep <=2799:
        c[6]=1
    elif 2800<= keep <=3199:
        c[7]=1
    else:
        cou += 1

MAX = MIN = c.count(1)
MAX += cou

print(MIN,MAX)

Submission status: Wrong Answer

Solution code:
import math
N=input()

A = list(map(int, input().split()))

Rate = []
for i in range(9):
    Rate.append(0)

for i in A:
    index=math.floor(i/400)
    if index > 8:
        index = 8
    Rate[index] = Rate[index] + 1

a = 0

for i in range(8):
    if Rate[i] > 0:
        a=a+1

Max = a + Rate[8]
Min = min(a, 1)

print(Min, Max)

Submission status: Wrong Answer

Solution code:
import math
N=input()

A=list(map(int,input().split()))

Rate=[]
for i in range(9):
    Rate.append(0)

for i in A:
    index=math.floor(i/400)
    if index>8:
        index=8
    Rate[index]=Rate[index]+1

a=0

for i in range(8):
    if Rate[i]>0:
        a=a+1

Max=a+Rate[8]
Min=min(a,1)

print(Min, Max)

Submission status: Wrong Answer

Solution code:
import math
N=input()

A=list(map(int,input().split()))

Rate=[]
for i in range(9):
    Rate.append(0)

for i in A:
    index=math.floor(i//400)
    if index>8:
        index=8
    Rate[index]=Rate[index]+1

a=0

for i in range(8):
    if Rate[i]>0:
        a=a+1

Max=a+Rate[8]
Min=min(a,1)

print(Min, Max)

Submission status: Wrong Answer

Solution code:
N=input()

A=list(map(int,input().split()))

Rate=[]
for i in range(9):
    Rate.append(0)

for i in A:
    index=int(i//400)
    if index>8:
        index=8
    Rate[index]=Rate[index]+1

a=0

for i in range(8):
    if Rate[i]>0:
        a=a+1

Max=a+Rate[8]
Min=min(a,1)

print(Min, Max)

Submission status: Wrong Answer

Solution code:
N=input()

A=list(map(int,input().split()))

Rate=[]
for i in range(9):
    Rate.append(0)

for i in A:
    index=i//400
    if index>8:
        index=8
    Rate[index]=Rate[index]+1

a=0

for i in range(8):
    if Rate[i]>0:
        a=a+1

Max=a+Rate[8]
Min=min(a,1)

print(Min, Max)

Submission status: Wrong Answer

Solution code:
N=input()

A=list(map(int,input().split()))

Rate=[]
for i in range(9):
    Rate.append(0)

for i in A:
    index=i//400
    if index>8:
        index=8
    Rate[index]=Rate[index]+1

a=0

for i in range(8):
    if Rate[i]>0:
        a=a+1

Max=a+Rate[8]
Min=min(a,1)

print(Min, Max)

Submission status: Wrong Answer

Solution code:
N=input()

A=list(map(int,input().split()))

Rate=[]
for i in range(9):
    Rate.append(0)

for i in A:
    index=i//400
    if index>8:
        index=8
    Rate[index]=Rate[index]+1

a=0

for i in range(8):
    if Rate[i]>0:
        a=a+1

Max=a+Rate[8]
Min=a+min(a,1)

print(Min, Max)

Submission status: Wrong Answer

Solution code:
input()
a = [int(num) for num in input().split()]
colors = [0 for i in range(8)]
alpha = 0
for i in a:
    if i<400:
        colors[0]=1
    elif i<800:
        colors[1]=1
    elif i<1200:
        colors[2]=1
    elif i<1600:
        colors[3]=1
    elif i<2000:
        colors[4]=1
    elif i<2400:
        colors[5]=1
    elif i<2800:
        colors[6]=1
    elif i<3200:
        colors[7]=1
    else:
        alpha += 1
min = colors.count(1)
max = colors.count(1) + alpha
if max>8:
    max = 8
print(str(min)+' '+str(max))

Submission status: Wrong Answer

Solution code:
N = int(input())
a = list(map(int, input().split()))
mi = 0
ma = 0
border = [1, 400, 800, 1200, 1600, 2000, 2400, 2800, 3200, 4800]
num = [0 for i in range(9)]
for i in a:
    for j in range(len(border[0:-1])):
        if(border[j] <= i and i < border[j+1]):
            num[j] += 1

for i in num[0:-1]:
    if(i > 0):
        mi += 1
        ma += 1

mi = max(1, mi)
ma = ma+num[-1]
print(mi, ma)

Submission status: Wrong Answer

Solution code:
N = int(input())
a = list(map(int, input().split()))
mi = 0
ma = 0
border = [1, 400, 800, 1200, 1600, 2000, 2400, 2800, 3200, 4800]
num = [0 for i in range(9)]
for i in a:
    for j in range(len(border[0:-1])):
        if(border[j] <= i and i < border[j+1]):
            num[j] += 1

for i in num[0:-1]:
    if(i > 0):
        mi += 1
        ma += 1

mi = max([1, mi, num[-1]])
ma = ma+num[-1]
print(mi, ma)

Submission status: Wrong Answer

Solution code:
N = int(input())
a = list(map(int, input().split()))
mi = 0
ma = 0
border = [1, 400, 800, 1200, 1600, 2000, 2400, 2800, 3200, 4800]
num = [0 for i in range(9)]
for i in a:
    for j in range(len(border[0:-1])):
        if(border[j] <= i and i < border[j+1]):
            num[j] += 1

for i in num[0:-1]:
    if(i > 0):
        mi += 1
        ma += 1

mi = max([1, mi, num[-1]])
ma = min(9, ma+num[-1])
print(mi, ma)

Submission status: Wrong Answer

Solution code:
N = int(input())
a = list(map(int, input().split()))
mi = 0
ma = 0
border = [1, 400, 800, 1200, 1600, 2000, 2400, 2800, 3200, 4800]
num = [0 for i in range(9)]
for i in a:
    for j in range(len(border[0:-1])):
        if(border[j] <= i and i < border[j+1]):
            num[j] += 1

for i in num[0:-1]:
    if(i > 0):
        mi += 1
        ma += 1

mi = max([1, mi, num[-1]])
ma = min(8, ma+num[-1])
print(mi, ma)

Submission status: Wrong Answer

Solution code:
import math

N=int(input())
s = list(map(int,input().split()))
c = []

for i in range(9):
    c.append(0)

for i in s:
    ii = math.floor(i / 400)
    if ii > 8:
        ii = 8
    c[ii] = c[ii] + 1

a = 0
for i in range(8):
    if c[i] > 0:
        a = a + 1

b = min(a + c[8], 8)
a = max(a, 1)

print(a, b)

Submission status: Wrong Answer

Solution code:
import math

N=int(input())
s = list(map(int,input().split()))
c = []

for i in range(9):
    c.append(0)

for i in s:
    ii = math.floor(i / 400)
    if ii > 8:
        ii = 8
    c[ii] = c[ii] + 1

a = 0
for i in range(8):
    if c[i] > 0:
        a = a + 1

b = min(a + c[8], 8)

print(a, b)

Submission status: Wrong Answer

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

flag1 = True
flag2 = True
flag3 = True
flag4 = True
flag5 = True
flag6 = True
flag7 = True
flag8 = True

Max = 0
Min = 0

for value in l:
	if 1 <= value and value < 400 and flag1 == True:
		flag1 = False
		Max += 1
		Min += 1
	elif 400 <= value and value < 800 and flag2 == True:
		flag2 = False
		Max += 1
		Min += 1
	elif 800 <= value and value < 1200 and flag3 == True:
		flag3 = False
		Max += 1
		Min +=1
	elif 1200 <= value and value < 1600 and flag4 == True:
		flag4 = False
		Max += 1
		Min += 1
	elif 1600 <= value and value < 2000 and flag5 == True:
		flag5 = False
		Max += 1
		Min += 1
	elif 2000 <= value and value < 2400 and flag6 == True:
		flag6 = False
		Max += 1
		Min += 1
	elif 2400 <= value and value < 2800 and flag7 == True:
		flag7= False
		Max += 1
		Min += 1
	elif 2800 <= value and value < 3200 and flag8 == True:
		flag8 = False
		Max += 1
		Min += 1
	elif 3200 <= value and value <= 4800:
		Max += 1

print(str(Min) + " " + str(Max))

Submission status: Wrong Answer

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

flag1 = True
flag2 = True
flag3 = True
flag4 = True
flag5 = True
flag6 = True
flag7 = True
flag8 = True

Max = 0
Min = 0

for value in l:
	if 1 <= value and value < 400 and flag1 == True:
		flag1 = False
		Max += 1
		Min += 1
	elif 400 <= value and value < 800 and flag2 == True:
		flag2 = False
		Max += 1
		Min += 1
	elif 800 <= value and value < 1200 and flag3 == True:
		flag3 = False
		Max += 1
		Min +=1
	elif 1200 <= value and value < 1600 and flag4 == True:
		flag4 = False
		Max += 1
		Min += 1
	elif 1600 <= value and value < 2000 and flag5 == True:
		flag5 = False
		Max += 1
		Min += 1
	elif 2000 <= value and value < 2400 and flag6 == True:
		flag6 = False
		Max += 1
		Min += 1
	elif 2400 <= value and value < 2800 and flag7 == True:
		flag7= False
		Max += 1
		Min += 1
	elif 2800 <= value and value < 3200 and flag8 == True:
		flag8 = False
		Max += 1
		Min += 1
	elif 3200 <= value:
		Max += 1

print(str(Min) + " " + str(Max))

Submission status: Wrong Answer

Solution code:
N = int(input())
l = list(map(int,input().split()))

flag1 = True
flag2 = True
flag3 = True
flag4 = True
flag5 = True
flag6 = True
flag7 = True
flag8 = True

Max = 0
Min = 0

for value in l:
	if 0 < value and value < 400 and flag1 == True:
		flag1 = False
		Max += 1
		Min += 1
	elif 400 <= value and value < 800 and flag2 == True:
		flag2 = False
		Max += 1
		Min += 1
	elif 800 <= value and value < 1200 and flag3 == True:
		flag3 = False
		Max += 1
		Min +=1
	elif 1200 <= value and value < 1600 and flag4 == True:
		flag4 = False
		Max += 1
		Min += 1
	elif 1600 <= value and value < 2000 and flag5 == True:
		flag5 = False
		Max += 1
		Min += 1
	elif 2000 <= value and value < 2400 and flag6 == True:
		flag6 = False
		Max += 1
		Min += 1
	elif 2400 <= value and value < 2800 and flag7 == True:
		flag7= False
		Max += 1
		Min += 1
	elif 2800 <= value and value < 3200 and flag8 == True:
		flag8 = False
		Max += 1
		Min += 1
	elif 3200 <= value:
		Max += 1

print(str(Min) + " " + str(Max))

Submission status: Wrong Answer

Solution code:
N = int(input())
l = list(map(int,input().split()))

flag1 = True
flag2 = True
flag3 = True
flag4 = True
flag5 = True
flag6 = True
flag7 = True
flag8 = True

Max = 0
Min = 0

for value in l:
	if 0 < value and value < 400 and flag1 == True:
		flag1 = False
		Max += 1
		Min += 1
		print(1)
	elif 400 <= value and value < 800 and flag2 == True:
		flag2 = False
		Max += 1
		Min += 1
		print(2)
	elif 800 <= value and value < 1200 and flag3 == True:
		flag3 = False
		Max += 1
		Min +=1
		print(3)
	elif 1200 <= value and value < 1600 and flag4 == True:
		flag4 = False
		Max += 1
		Min += 1
		print(4)
	elif 1600 <= value and value < 2000 and flag5 == True:
		flag5 = False
		Max += 1
		Min += 1
		print(5)
	elif 2000 <= value and value < 2400 and flag6 == True:
		flag6 = False
		Max += 1
		Min += 1
		print(6)
	elif 2400 <= value and value < 2800 and flag7 == True:
		flag7= False
		Max += 1
		Min += 1
		print(7)
	elif 2800 <= value and value < 3200 and flag8 == True:
		flag8 = False
		Max += 1
		Min += 1
		print(8)
	elif 3200 <= value:
		Max += 1
		print(0)

print(str(Min) + " " + str(Max))

Submission status: Wrong Answer

Solution code:
N = int(input())
l = list(map(int,input().split()))

flag1 = True
flag2 = True
flag3 = True
flag4 = True
flag5 = True
flag6 = True
flag7 = True
flag8 = True

Max = 0
Min = 0

for value in l:
	if 0 < value and value < 400 and flag1 == True:
		flag1 = False
		Max += 1
		Min += 1
	elif 400 <= value and value < 800 and flag2 == True:
		flag2 = False
		Max += 1
		Min += 1
	elif 800 <= value and value < 1200 and flag3 == True:
		flag3 = False
		Max += 1
		Min += 1
	elif 1200 <= value and value < 1600 and flag4 == True:
		flag4 = False
		Max += 1
		Min += 1
	elif 1600 <= value and value < 2000 and flag5 == True:
		flag5 = False
		Max += 1
		Min += 1
	elif 2000 <= value and value < 2400 and flag6 == True:
		flag6 = False
		Max += 1
		Min += 1
	elif 2400 <= value and value < 2800 and flag7 == True:
		flag7= False
		Max += 1
		Min += 1
	elif 2800 <= value and value < 3200 and flag8 == True:
		flag8 = False
		Max += 1
		Min += 1
	else:
		Max += 1

print(str(Min) + " " + str(Max))

Submission status: Wrong Answer

Solution code:
N = int(input())
l = list(map(int,input().split()))

flag1 = True
flag2 = True
flag3 = True
flag4 = True
flag5 = True
flag6 = True
flag7 = True
flag8 = True

Max = 0
Min = 0

def plus():
	Max += 1
	Min += 1
	return 0

for value in l:
	if value < 400 and flag1 == True:
		flag1 = False
		Max += 1
		Min += 1
	elif value < 800 and flag2 == True:
		flag2 = False
		Max += 1
		Min += 1
	elif value < 1200 and flag3 == True:
		flag3 = False
		Max += 1
		Min += 1
	elif value < 1600 and flag4 == True:
		flag4 = False
		Max += 1
		Min += 1
	elif value < 2000 and flag5 == True:
		flag5 = False
		Max += 1
		Min += 1
	elif value < 2400 and flag6 == True:
		flag6 = False
		Max += 1
		Min += 1
	elif value < 2800 and flag7 == True:
		flag7= False
		Max += 1
		Min += 1
	elif value < 3200 and flag8 == True:
		flag8 = False
		Max += 1
		Min += 1
	else:
		Max += 1

print(str(Min) + " " + str(Max))

Submission status: Wrong Answer

Solution code:

N=int(input())

a=[int(i) for i in input().split()]

color=[0,0,0,0,0,0,0,0]
alles=0

for i in range(N) :
    
    if a[i]<400 :
        color[0]+=1
    elif a[i]<800 :
        color[1]+=1
    elif a[i]<1200 :
        color[2]+=1
    elif a[i]<1600 :
        color[3]+=1
    elif a[i]<2000 :
        color[4]+=1
    elif a[i]<2400 :
        color[5]+=1
    elif a[i]<2800 :
        color[6]+=1
    elif a[i]<3200 :
        color[7]+=1
    else :
        alles+=1

        
while 0 in color :color.remove(0)
eight=int(8)

if alles+len(color)>=8 :
    if len(color)==0 :
        print(int(1)," ",eight)
    else :
        print(len(color)," ",eight)
else :
    if len(color)==0 :
        print(int(1)," ",len(color)+alles)
    else :
        print(len(color)," ",len(color)+alles)

Submission status: Wrong Answer

Solution code:

N=int(input())

a=[int(i) for i in input().split()]

color=[0,0,0,0,0,0,0,0]
alles=0

for i in range(N) :
    
    if a[i]<400 :
        color[0]+=1
    elif a[i]<800 :
        color[1]+=1
    elif a[i]<1200 :
        color[2]+=1
    elif a[i]<1600 :
        color[3]+=1
    elif a[i]<2000 :
        color[4]+=1
    elif a[i]<2400 :
        color[5]+=1
    elif a[i]<2800 :
        color[6]+=1
    elif a[i]<3200 :
        color[7]+=1
    else :
        alles+=1

        
while 0 in color :color.remove(0)
eight=int(8)

if alles+len(color)>=8 :
    if alles>=len(color) :
        print(len(color)," ",eight)
    else :
        print(len(color)," ",eight)
else :
    if alles>=len(color) :
        print(len(color)," ",len(color)+alles)
    else :
        print(len(color)," ",len(color)+alles)

Submission status: Wrong Answer

Solution code:

N=int(input())

a=[int(i) for i in input().split()]

color=[0,0,0,0,0,0,0,0]
alles=0

for i in range(N) :
    
    if a[i]<400 :
        color[0]+=1
    elif a[i]<800 :
        color[1]+=1
    elif a[i]<1200 :
        color[2]+=1
    elif a[i]<1600 :
        color[3]+=1
    elif a[i]<2000 :
        color[4]+=1
    elif a[i]<2400 :
        color[5]+=1
    elif a[i]<2800 :
        color[6]+=1
    elif a[i]<3200 :
        color[7]+=1
    else :
        alles+=1

        
while 0 in color :color.remove(0)
eight=int(8)

if alles>=8 :
    print(eight," ",eight)
elif alles+len(color)>=8 :
    if alles>=len(color) :
        print(alles," ",eight)
    else :
        print(len(color)," ",eight)
else :
    if alles>=len(color) :
        print(alles," ",len(color)+alles)
    else :
        print(len(color)," ",len(color)+alles)

Submission status: Wrong Answer

Solution code:

N=int(input())

a=[int(i) for i in input().split()]

color=[0,0,0,0,0,0,0,0]
alles=0

for i in range(N) :
    
    if a[i]<400 :
        color[0]+=1
    elif a[i]<800 :
        color[1]+=1
    elif a[i]<1200 :
        color[2]+=1
    elif a[i]<1600 :
        color[3]+=1
    elif a[i]<2000 :
        color[4]+=1
    elif a[i]<2400 :
        color[5]+=1
    elif a[i]<2800 :
        color[6]+=1
    elif a[i]<3200 :
        color[7]+=1
    else :
        alles+=1

        
while 0 in color :color.remove(0)
eight=int(8)

if alles>=8 :
    print(eight," ",eight)
elif alles+len(color)>8 :
    if alles>=len(color) :
        print(alles," ",eight)
    else :
        print(len(color)," ",eight)
else :
    if alles>=len(color) :
        print(alles," ",len(color)+alles)
    else :
        print(len(color)," ",len(color)+alles)

Submission status: Wrong Answer

Solution code:
def f(A):
    counter = [0 for _ in range(8)]
    n_free = 0
    for a in A:
        if a >= 3200:
            n_free += 1
        else:
            idx = a // 400
            counter[idx] += 1
    if sum(counter) > 0:
        n_min = sum(count > 0 for count in counter)
    else:
        n_min = 1
    n_max = n_min + n_free
    return n_min, n_max

N = int(input())
A = list(map(int, input().split()))
n_min, n_max = f(A)
print("{} {}".format(n_min, n_max))

Submission status: Wrong Answer

Solution code:
def f(A):
    counter = [0 for _ in range(8)]
    n_free = 0
    for a in A:
        if a >= 3200:
            n_free += 1
        else:
            idx = a // 400
            counter[idx] += 1
    n_min = sum(count > 0 for count in counter)
    n_max = n_min + n_free
    return n_min, n_max

N = int(input())
A = list(map(int, input().split()))
n_min, n_max = f(A)
print("{} {}".format(n_min, n_max))

Submission status: Wrong Answer

Solution code:
def f(A):
    counter = [0 for _ in range(8)]
    n_free = 0
    for a in A:
        if a >= 3200:
            n_free += 1
        else:
            idx = a // 400
            counter[idx] += 1
    n_min = sum(count > 0 for count in counter)
    n_max = min(n_min + n_free, 8)
    return n_min, n_max

N = int(input())
A = list(map(int, input().split()))
n_min, n_max = f(A)
print("{} {}".format(n_min, n_max))

Submission status: Wrong Answer

Solution code:
a=[0]*9;input()
for x in list(map(int,input().split())):
    if x<3200:a[x//400]=1
    else:a[8]=a[8]+1 if a[8]<8 else 8
b=sum(a[:8]);print(b*(b!=0)or 1,b*(b in [0,8])or b+a[8])

Submission status: Wrong Answer

Solution code:
N = int(input())
a = list(map(int,input().split()))
b = []
j = 0
for i in a:
	if i < 3200:
		b.append(int(i/400))
	if i >= 3200:
		j += 1
k = len(set(b))
if k == 0 and j > 0:
	k = 1
print(k,k+j)

Submission status: Wrong Answer

Solution code:
N = int(input())
a = list(map(int, input().split()))

d = [0] * 9
for i in a:
    if i <= 399:
        d[0] = 1
    elif i <= 799:
        d[1] = 1
    elif i <= 1199:
        d[2] = 1
    elif i <= 1599:
        d[3] = 1
    elif i <= 1999:
        d[4] = 1
    elif i <= 2399:
        d[5] = 1
    elif i <= 2799:
        d[6] = 1
    elif i <= 3199:
        d[7] = 1
    else:
        d[8] += 1

minimam = sum(d[:8])
maximam = minimam + d[8]

print(minimam, maximam)