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:
import numpy as np
Level = [1, 400, 800, 1200, 1600, 2000, 2400, 2800, 3200]
N = int(input())
Point = [int(x) for x in input().split()]

def solve():
    count = np.zeros(len(Level), dtype=int)
    for p in Point:
        over3200 = True
        for i in range(1, len(Level)):
            if p<Level[i]: 
                count[i-1] += 1
                over3200 = False
                break
        if over3200: count[-1] += 1
#    print(count)
    colorCount = 0
    for i in range(len(count)-1): #3200点以上は除く
        if count[i]>0: colorCount += 1
    
    return colorCount, min(colorCount + count[-1], len(Level)-1)

#print(N)
#print(Point)
mi, ma = solve()
print(mi, ma)

Submission status: Wrong Answer

Solution code:
import numpy as np
Level = [1, 400, 800, 1200, 1600, 2000, 2400, 2800, 3200]
N = int(input())
Point = [int(x) for x in input().split()]

def solve():
    count = np.zeros(len(Level), dtype=int)
    for p in Point:
        over3200 = True
        for i in range(1, len(Level)):
            if p<Level[i]: 
                count[i-1] += 1
                over3200 = False
                break
        if over3200: count[-1] += 1
#    print(count)
    colorCount = 0
    for i in range(len(count)-1): #3200点以上は除く
        if count[i]>0: colorCount += 1
    
    return colorCount, colorCount+count[-1]

#print(N)
#print(Point)
mi, ma = solve()
print(mi, ma)

Submission status: Wrong Answer

Solution code:
def abc064_c():
    _ = int(input())
    a = list(map(int, input().split()))
    color = [False] * 8
    higher = 0
    for v in a:
        if v >= 3200:
            higher += 1
        else:
            color[v // 400] = True
    print(sum(color), sum(color) + higher)


abc064_c()

Submission status: Wrong Answer

Solution code:
n = input()
a = list(map(int, input().split()))
colored = [0,0,0,0,0,0,0,0]
god = 0
for i in a:
  if i >= 3200:
    god += 1
  else:
    colored[i // 400] += 1
color = 8 - colored.count(0)
if color == 0:
  print(god,god)
else:
  print(color, color+god)

Submission status: Wrong Answer

Solution code:
n = input()
a = list(map(int, input().split()))
colored = [0,0,0,0,0,0,0,0]
god = 0
for i in a:
  if i >= 3200:
    god += 1
  else:
    colored[i // 400] += 1
color = 8 - colored.count(0)
print(color, color+god)

Submission status: Wrong Answer

Solution code:
N = int(input())
a = [int(e) for e in input().split()]

su = [0] * 9
for e in a:
    if e >= 3200:
        su[8] += 1
    else:
        su[e//400] += 1
mi = 0
for e in su[:8]:
    if e != 0:
        mi += 1
ma = min(8, mi+su[8])
mi = max(1, mi)
print(mi, ma)

Submission status: Wrong Answer

Solution code:
N = int(input())
a = [int(e) for e in input().split()]

su = [0] * 9
for e in a:
    if e >= 3200:
        su[8] += 1
    else:
        su[e//400] += 1
mi = 0
for e in su[:8]:
    if e != 0:
        mi += 1
mi = max(1, mi)
ma = min(8, mi+su[8])
print(mi, ma)

Submission status: Wrong Answer

Solution code:
N = int(input())
a = [int(e) for e in input().split()]

su = [0] * 9
for e in a:
    if e >= 3200:
        su[8] += 1
    else:
        su[e//400] += 1
mi = 0
for e in su[:8]:
    print(e)
    if e != 0:
        mi += 1
mi = max(1, mi)
ma = min(8, mi+su[8])
print(mi, ma)

Submission status: Wrong Answer

Solution code:
N = int(input())
a = [int(e) for e in input().split()]

su = [0] * 9
for e in a:
    if e >= 3200:
        su[8] += 1
    else:
        su[e//400] += 1
mi = 0
for e in su[:8]:
    if e != 0:
        mi += 1
ma = min(8, mi+su[8])
print(mi, ma)

Submission status: Wrong Answer

Solution code:
N = int(input().strip())
a = list(map(int, input().strip().split()))
cl = [0 for _ in range(9)]

for _a in a:
  cl[min(_a//400, 8)] += 1

f = cl[-1]
minc = sum([1 for c in cl[:8] if c!=0])
print(max(minc, 1), min(minc + f, 8))

Submission status: Wrong Answer

Solution code:
N = int(input().strip())
a = list(map(int, input().strip().split()))
cl = [0 for _ in range(9)]

for _a in a:
  cl[min(_a//400, 8)] += 1

f = cl[-1]
minc = sum([1 for c in cl[:8] if c!=0])
print(minc, min(minc + f, 8))

Submission status: Wrong Answer

Solution code:
rate = [0 for _ in range(8)]
frate = 0

n = int(input())
a = list(map(int, input().split()))

for i in range(n):
    if a[i] < 400:
        rate[0] += 1

    elif a[i] < 800:
        rate[1] += 1

    elif a[i] < 1200:
        rate[2] += 1

    elif a[i] < 1600:
        rate[3] += 1

    elif a[i] < 2000:
        rate[4] += 1

    elif a[i] < 2400:
        rate[5] += 1

    elif a[i] < 2800:
        rate[6] += 1

    elif a[i] < 3200:
        rate[7] += 1

    else:
        frate += 1

#print(rate)

iro = len(list(filter(lambda x: x != 0, rate)))

if frate == 0:
    print(iro, iro)

else:
    print(iro, iro + frate)

Submission status: Wrong Answer

Solution code:
#C Colorful
import numpy as np
a = int(input())
x = list(map(int,input().split()))
x.sort()
x = x[::-1]
n =0
k = [0,0,0,0,0,0,0,0]
for i in x:
    if i < 400:
        k[0] = 1
    elif i < 800:
        k[1] = 1
    elif i < 1200:
        k[2] = 1
    elif i < 1600:
        k[3] = 1
    elif i < 2000:
        k[4] = 1
    elif i < 2400:
        k[5] = 1
    elif i < 2800:
        k[6] = 1
    elif i < 3200:
        k[7] = 1
    else:
        n = n + 1
c = np.array(k)
s = ss= c.sum()

if s < 8:
    ss = ss + n
    if ss > 8:
        ss = 8
print (s,ss)

Submission status: Wrong Answer

Solution code:
#C Colorful
import numpy as np
a = int(input())
x = list(map(int,input().split()))
x.sort()
x = x[::-1]
n =0
k = [0,0,0,0,0,0,0,0]
for i in x:
    if i < 400:
        k[0] = 1
    elif i < 800:
        k[1] = 1
    elif i < 1200:
        k[2] = 1
    elif i < 1600:
        k[3] = 1
    elif i < 2000:
        k[4] = 1
    elif i < 2400:
        k[5] = 1
    elif i < 2800:
        k[6] = 1
    elif i < 3200:
        k[7] = 1
    else:
        n +=1
c = np.array(k)
s = ss= c.sum()

if s < 8:
    ss = ss + n
    if ss > 8:
        ss = 8
print (s,ss)

Submission status: Wrong Answer

Solution code:
#C Colorful
import numpy as np
a = int(input())
x = list(map(int,input().split()))
x.sort()
x = x[::-1]
n =0
k = [0,0,0,0,0,0,0,0]
for i in x:
    if i < 400:
        k[0] = 1
    elif i < 800:
        k[1] = 1
    elif i < 1200:
        k[2] = 1
    elif i < 1600:
        k[3] = 1
    elif i < 2000:
        k[4] = 1
    elif i < 2400:
        k[5] = 1
    elif i < 2800:
        k[6] = 1
    elif i < 3200:
        k[7] = 1
    else:
        n +=1
c = np.array(k)
s = ss= c.sum()

if s < 8:
    ss += n
    if ss > 8:
        ss = 8
print (s , ss)

Submission status: Wrong Answer

Solution code:
#C Colorful
import numpy as np
a = int(input())
x = list(map(int,input().split()))
x.sort()
x = x[::-1]
n =0
k = [0,0,0,0,0,0,0,0]
for i in x:
    if i > 3199:
        n +=1
    elif i < 400:
        k[0] = 1
    elif i < 800:
        k[1] = 1
    elif i < 1200:
        k[2] = 1
    elif i < 1600:
        k[3] = 1
    elif i < 2000:
        k[4] = 1
    elif i < 2400:
        k[5] = 1
    elif i < 2800:
        k[6] = 1
    elif i < 3200:
        k[7] = 1

c = np.array(k)
s = ss= c.sum()

if s < 8:
    ss += n
    if ss > 8:
        ss = 8
print (s , ss)

Submission status: Wrong Answer

Solution code:
def main():
    _ = input()
    aa = map(int, input().split())
    counts = [0] * 9
    for a in aa:
        a //= 400
        counts[min(a, 8)] += 1
    color = sum(map(lambda c: 1 if c > 0 else 0, counts[:-1]))
    if counts[-1] == 0:
        print(color, color)
    else:
        print(max(color, 1), min(color + counts[-1], 8))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
a = list(map(lambda x:x//400, a))
a.sort()
tourist = 0
for i in range(n):
	if a[i]>=8:
		tourist = n-i
		break
min = len(set(a[:n-tourist]))
print(min, min+tourist)

Submission status: Wrong Answer

Solution code:
n=input()
al=list(map(int,input().split()))
l=[]
fc=0;
for a in al:
    if a < 400:
        l.append('灰色')
    elif a < 800:
        l.append('茶色')
    elif a < 1200:
        l.append('緑色')
    elif a < 1600:
        l.append('水色')
    elif a < 2000:
        l.append('青色')
    elif a < 2400:
        l.append('黄色')
    elif a < 2800:
        l.append('橙色')
    elif a < 3200:
        l.append('赤色')
    else:
        fc+=1
mi=len(set(l))
print(mi,mi+fc)

Submission status: Wrong Answer

Solution code:
# coding: UTF-8
import sys
#sys.setrecursionlimit(n)
import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

N = int(input())
a = list(map(int, input().split()))
s = set()
cnt = 0
for v in a:
    if 1 <= v <= 399:
        s.add(1)
    elif 400 <= v <= 799:
        s.add(2)
    elif 800 <= v <= 1199:
        s.add(3)
    elif 1200 <= v <= 1599:
        s.add(4)
    elif 1600 <= v <= 1999:
        s.add(5)
    elif 2000 <= v <= 2399:
        s.add(6)
    elif 2400 <= v <= 2799:
        s.add(7)
    elif 2800 <= v <= 3199:
        s.add(8)
    elif 3200 <= v:
        cnt += 1
print(len(s), len(s) + cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
R = [int(i) for i in input().split()]
S = set()
f = 0
for i in R:
    if i//400 < 8:
        S.add(i//400)
    else:
        f += 1

t = max(1,len(S)) 
mx = min(len(S)+f, 8)
print(t,mx)

Submission status: Wrong Answer

Solution code:
# coding: UTF-8
import sys
#sys.setrecursionlimit(n)
import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

N = int(input())
a = list(map(int, input().split()))
s = set()
cnt = 0
for v in a:
    if v < 400:
        s.add(1)
    elif v < 800:
        s.add(2)
    elif v < 1200:
        s.add(3)
    elif v < 1600:
        s.add(4)
    elif v < 2000:
        s.add(5)
    elif v < 2400:
        s.add(6)
    elif v < 2800:
        s.add(7)
    elif v < 3200:
        s.add(8)
    else:
        cnt += 1
print(len(s), len(s) + cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
R = [(int(i)//400) for i in input().split()]
S = set()
f = 0
for i in R:
    if i < 8:
        S.add(i)
    else:
        f += 1

t = max(1,len(S)) 
mx = min(len(S)+f, 8)
print(t,mx)

Submission status: Wrong Answer

Solution code:
N = int(input())
R = [(int(i)//400) for i in input().split()]
S = set()
f = 0
for i in R:
    if i < 8:
        S.add(i)
    else:
        f += 1

t = S.__len__()
mx = min(t+f, 8)
if t == 0:
    t = 1
print(t,mx)

Submission status: Wrong Answer

Solution code:
N = int(input())
R = [(int(i)//400) for i in input().split()]
S = set()
f = 0
for i in R:
    if i < 8:
        S.add(i)
    else:
        f += 1

t = S.__len__()
mx = min(t+f, 8)

print(t,mx)

Submission status: Wrong Answer

Solution code:
N = int(input())
R = [int(i)//400 for i in input().split()]
S = set()
f = 0
for i in R:
    if i < 8:
        S.add(i)
    else:
        f += 1

t = S.__len__()
mx = min(t+f, 8)

print(t,mx)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=list(map(int,input().split()))
b=[0]*8
free=0
for i in a:
    if i<400:
        b[0]+=1
    elif i<800:
        b[1]+=1
    elif i<1200:
        b[2]+=1
    elif i<1600:
        b[3]+=1
    elif i<2000:
        b[4]+=1
    elif i<2400:
        b[5]+=1
    elif i<2800:
        b[6]+=1
    elif i<3200:
        b[7]+=1
    else:
        free+=1
tmp=[i for i in b if i>0]
min_color=len(tmp)
max_color=len(tmp)+free
print("{} {}".format(min_color,max_color))

Submission status: Wrong Answer

Solution code:
n=int(input())
a=list(map(int,input().split()))
b=[0]*8
free=0
for i in a:
    if i<400:
        b[0]+=1
    elif i<800:
        b[1]+=1
    elif i<1200:
        b[2]+=1
    elif i<1600:
        b[3]+=1
    elif i<2000:
        b[4]+=1
    elif i<2400:
        b[5]+=1
    elif i<2800:
        b[6]+=1
    elif i<3200:
        b[7]+=1
    else:
        free+=1
min_color=8-b.count(0)
max_color=min_color+free
print("{} {}".format(min_color,max_color))

Submission status: Wrong Answer

Solution code:
n=int(input())
a=list(map(int,input().split()))
b=[0]*8
free=0
for i in a:
    if 1<=i<400:
        b[0]+=1
    elif i<800:
        b[1]+=1
    elif i<1200:
        b[2]+=1
    elif i<1600:
        b[3]+=1
    elif i<2000:
        b[4]+=1
    elif i<2400:
        b[5]+=1
    elif i<2800:
        b[6]+=1
    elif i<3200:
        b[7]+=1
    else:
        free+=1
min_color=8-b.count(0)
max_color=8-b.count(0)+free
print("{} {}".format(min_color,max_color))

Submission status: Wrong Answer

Solution code:
n=int(input())
a=list(map(int,input().split()))
b=[0]*8
free=0
for i in a:
    if 1<=i<400:
        b[0]+=1
    elif i<800:
        b[1]+=1
    elif i<1200:
        b[2]+=1
    elif i<1600:
        b[3]+=1
    elif i<2000:
        b[4]+=1
    elif i<2400:
        b[5]+=1
    elif i<2800:
        b[6]+=1
    elif i<3200:
        b[7]+=1
    else:
        free+=1
min_color=8-b.count(0)
max_color=8-b.count(0)+free
if max_color>8:
    max_color=8
print("{} {}".format(min_color,max_color))

Submission status: Wrong Answer

Solution code:
n=int(input())
a=list(map(int,input().split()))
b=[0]*8
free=0
for i in a:
    if 1<=i<400:
        b[0]+=1
    elif i<800:
        b[1]+=1
    elif i<1200:
        b[2]+=1
    elif i<1600:
        b[3]+=1
    elif i<2000:
        b[4]+=1
    elif i<2400:
        b[5]+=1
    elif i<2800:
        b[6]+=1
    elif i<=3200:
        b[7]+=1
    else:
        free+=1
min_color=8-b.count(0)
max_color=8-b.count(0)+free
if max_color>8:
    max_color=8
print("{} {}".format(min_color,max_color))

Submission status: Wrong Answer

Solution code:
n=int(input())
a=list(map(int,input().split()))
b=[0]*8
free=0
for i in a:
    if 1<=i<400:
        b[0]+=1
    elif i<=799:
        b[1]+=1
    elif i<=1199:
        b[2]+=1
    elif i<=1599:
        b[3]+=1
    elif i<=1999:
        b[4]+=1
    elif i<=2399:
        b[5]+=1
    elif i<=2799:
        b[6]+=1
    elif i<=3199:
        b[7]+=1
    elif i>=3200:
        free+=1
min_color=8-b.count(0)
if min_color==0 and free!=0:
    min_color=1
max_color=8-b.count(0)
if b.count(0)>free:
    max_color+=free
else:
    max_color=8
print("{} {}".format(min_color,max_color))

Submission status: Wrong Answer

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

s = set()
c = 0

for i in range(n):
    if 1 <= a[i] <= 399:
        s.add(1)

    elif 400 <= a[i] <= 799:
        s.add(2)

    elif 800 <= a[i] <= 1199:
        s.add(3)

    elif 1200 <= a[i] <= 1599:
        s.add(4)

    elif 1600 <= a[i] <= 1999:
        s.add(5)

    elif 2000 <= a[i] <= 2399:
        s.add(6)

    elif 2400 <= a[i] <= 2799:
        s.add(7)

    elif 2800 <= a[i] <= 3199:
        s.add(8)

    else:
        c += 1

print(len(s), len(s)+c)

Submission status: Wrong Answer

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

s = set()
c = 0

for i in range(n):
    if 1 <= a[i] < 399:
        s.add(1)

    elif 400 <= a[i] < 799:
        s.add(2)

    elif 800 <= a[i] < 1199:
        s.add(3)

    elif 1200 <= a[i] < 1599:
        s.add(4)

    elif 1600 <= a[i] < 1999:
        s.add(5)

    elif 2000 <= a[i] < 2399:
        s.add(6)

    elif 2400 <= a[i] < 2799:
        s.add(7)

    elif 2800 <= a[i] < 3199:
        s.add(8)

    else:
        c += 1

print(len(s), len(s)+c)

Submission status: Wrong Answer

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

s = set()
c = 0

for i in range(n):
    if 1 <= a[i] < 399:
        s.add(1)

    elif 400 <= a[i] < 799:
        s.add(2)

    elif 800 <= a[i] < 1199:
        s.add(3)

    elif 1200 <= a[i] < 1599:
        s.add(4)

    elif 1600 <= a[i] < 1999:
        s.add(5)

    elif 2000 <= a[i] < 2399:
        s.add(6)

    elif 2400 <= a[i] < 2799:
        s.add(7)

    elif 2800 <= a[i] < 3199:
        s.add(8)

    else:
        c += 1

print(len(s), min(len(s)+c, 8))

Submission status: Wrong Answer

Solution code:
N = int(input())
all = 0
colors = [0] * 8
for a in map(int, input().split()):
  if a >= 3200:
    all += 1
  else:
    colors[a // 400] = 1
print(sum(colors), sum(colors) + all)

Submission status: Wrong Answer

Solution code:
N = int(input())
all = 0
colors = [0] * 8
for a in map(int, input().split()):
  if a >= 3200:
    all += 1
  else:
    colors[a // 400] = 1
print(sum(colors), min(sum(colors) + all, 8))

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int,input().split()))
rate = [0] * 9
for e in A:
    for i in range(8,-1,-1):
        if e >= 400*i:
            rate[i] += 1
            break
rate_ex = rate[:-1]
color_kind = 0
for e in rate_ex:
    if e > 0:
        color_kind += 1
print(color_kind)
min_kind = color_kind 
if min_kind == 0:
    min_kind = 1
max_kind = color_kind + rate[-1]
print(min_kind,max_kind)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int,input().split()))
rate = [0] * 9
for e in A:
    for i in range(8,-1,-1):
        if e >= 400*i:
            rate[i] += 1
            break
rate_ex = rate[:-1]
color_kind = 0
for e in rate_ex:
    if e > 0:
        color_kind += 1
min_kind = color_kind 
if min_kind == 0:
    min_kind = 1
max_kind = color_kind + rate[-1]
if max_kind > 8:
    max_kind = 8
print(min_kind,max_kind)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int,input().split()))
rate = [0] * 9
for e in A:
    for i in range(8,-1,-1):
        if e >= 400*i:
            rate[i] += 1
            break
rate_ex = rate[:-1]
color_kind = 0
for e in rate_ex:
    if e > 0:
        color_kind += 1
min_kind = color_kind 
max_kind = color_kind + rate[-1]
if max_kind > 8:
    max_kind = 8
print(min_kind,max_kind)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=[int(i) for i in input().split()]
iro=[0 for i in range(8)]
tyi=0
for i in range(n):
  if a[i]<3200:
    iro[int(a[i]/400)]=1
  else:
    tyi+=1
print(max(iro.count(1),1),min(iro.count(1)+tyi,8))

Submission status: Wrong Answer

Solution code:
n=int(input())
a=[int(i) for i in input().split()]
iro=[0 for i in range(8)]
tyi=0
for i in range(n):
  if a[i]<3200:
    iro[int(a[i]/400)]=1
  else:
    tyi+=1
print(min(iro.count(1)+tyi,8))

Submission status: Wrong Answer

Solution code:
N = int(input())
al = map(int, input().strip().split(" "))

additional = 0
dic = {}
for a in al:
    if 1 <= a <= 399:
        dic['0'] = 0
    if 400 <= a <= 799:
        dic['1'] = 0
    if 800 <= a <= 1199:
        dic['2'] = 0
    if 1200 <= a <= 1599:
        dic['3'] = 0
    if 1600 <= a <= 1999:
        dic['4'] = 0
    if 2000 <= a <= 2399:
        dic['5'] = 0
    if 2400 <= a <= 2799:
        dic['6'] = 0
    if 2800 <= a <= 3199:
        dic['7'] = 0
    if 3200 <= a:
        additional += 1

leng = len(dic.keys())
print(max(leng, additional), leng + additional)

Submission status: Wrong Answer

Solution code:
N = int(input())
al = map(int, input().strip().split(" "))

colors = 0
additional = 0
dic = {}
for a in al:
    if 1 <= a <= 399:
        dic['0'] = 0
    if 400 <= a <= 799:
        dic['1'] = 0
    if 800 <= a <= 1199:
        dic['2'] = 0
    if 1200 <= a <= 1599:
        dic['3'] = 0
    if 1600 <= a <= 1999:
        dic['4'] = 0
    if 2000 <= a <= 2399:
        dic['5'] = 0
    if 2400 <= a <= 2799:
        dic['6'] = 0
    if 2800 <= a <= 3199:
        dic['7'] = 0
    if 3200 <= a:
        additional += 1

leng = len(dic.keys())
print(leng, leng + additional)

Submission status: Wrong Answer

Solution code:
N = input()
rates = [int(i) for i in input().split()]

color = [0] * 9
for rate in rates:
    if rate/400 < 8:
        color[int(rate/400)] += 1
    else:
        color[8] += 1

num = 0
for i in color[:8]:
    if i:
        num += 1

if num:
    mi = num
    ma = min(num + color[8], 8)
else:
    mi = 1
    ma = min(num + color[8], 8)

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

Submission status: Wrong Answer

Solution code:
n=int(input())
a=list(map(int,input().split()))
nl=[0 for i in range(8)]
c=0
for i in range(len(a)):
    if a[i]>=3200:
        c+=1
    for j in range(8):
        if 400*j<=a[i] and a[i]<400*(j+1):
            nl[j]=1
if sum(nl)==0:
    m=c
else:
    m=sum(nl)
print(m,sum(nl)+c)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=list(map(int,input().split()))
nl=[0 for i in range(8)]
c=0
for i in range(len(a)):
    if a[i]>=3200:
        c+=1
    for j in range(8):
        if 400*j<=a[i] and a[i]<400*(j+1):
            nl[j]=1
print(sum(nl),sum(nl)+c)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=list(map(int,input().split()))
nl=[0 for i in range(7)]
c=0
for i in range(len(a)):
    if a[i]>=2800:
        c+=1
    for j in range(7):
        if 400*j<=a[i] and a[i]<400*(j+1):
            nl[j]=1
print(sum(nl),sum(nl)+c)

Submission status: Wrong Answer

Solution code:
N=int(input())
a=[0,]*9
rates=list(map(int,input().split()))
for i in range(N):
    rank=int(rates[i]/400)
    if rank>8:
        rank=8
    a[rank]+=1
variation=0
for i in range(8):
    if a[i] > 0:
        variation+=1
print(str(variation)+" "+str(variation+a[8]))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
a = list(map(int, input().split()))
over = 0
rate = set()
for x in a:
    if 399>=x>=1:
        rate.add(1)
    elif 799>=x>=400:
        rate.add(2)
    elif 1199>=x>=800:
        rate.add(3)
    elif 1599>=x>=1200:
        rate.add(4)
    elif 1999>=x>=1600:
        rate.add(5)
    elif 2399>=x>=2000:
        rate.add(6)
    elif 2799>=x>=2400:
        rate.add(7)
    elif 3199>=x>=2800:
        rate.add(8)
    else:
        over += 1

if len(rate)>0:
    print(len(rate),min(len(rate)+over,8))
else:
    print(1,min(over,8))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
a = list(map(int, input().split()))
over = 0
rate = set()
for x in a:
    if 399>=x>=1:
        rate.add(1)
    elif 799>=x>=400:
        rate.add(2)
    elif 1199>=x>=800:
        rate.add(3)
    elif 1599>=x>=1200:
        rate.add(4)
    elif 1999>=x>=1600:
        rate.add(5)
    elif 2399>=x>=2000:
        rate.add(6)
    elif 2799>=x>=2400:
        rate.add(7)
    elif 3199>=x>=2800:
        rate.add(8)
    else:
        over += 1

if len(rate)==8:
    print(8,8)
elif len(rate)>0:
    print(len(rate),min(len(rate)+over,8))
else:
    if over>1:
        print(1,2)
    else:
        print(1,1)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
a = list(map(int, input().split()))
over = 0
rate = set()
for x in a:
    if 399>=x>=1:
        rate.add(1)
    elif 799>=x>=400:
        rate.add(2)
    elif 1199>=x>=800:
        rate.add(3)
    elif 1599>=x>=1200:
        rate.add(4)
    elif 1999>=x>=1600:
        rate.add(5)
    elif 2399>=x>=2000:
        rate.add(6)
    elif 2799>=x>=2400:
        rate.add(7)
    elif 3199>=x>=2800:
        rate.add(8)
    else:
        over += 1

if len(rate)==8:
    print(8,8)
elif len(rate)>0:
    print(len(rate),max(len(rate)+over,8))
else:
    if over>1:
        print(1,2)
    else:
        print(1,1)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
a = list(map(int, input().split()))
over = 0
rate = set()
for x in a:
    if 399>=x>=1:
        rate.add(1)
    elif 799>=x>=400:
        rate.add(2)
    elif 1199>=x>=800:
        rate.add(3)
    elif 1599>=x>=1200:
        rate.add(4)
    elif 1999>=x>=1600:
        rate.add(5)
    elif 2399>=x>=2000:
        rate.add(6)
    elif 2799>=x>=2400:
        rate.add(7)
    elif 3199>=x>=2800:
        rate.add(8)
    else:
        over += 1

if len(rate)==8:
    print(8,8)
elif len(rate)==7 and over>0:
    print(7,8)
elif len(rate)>0:
    if over>1:
        print(len(rate),len(rate)+2)
    elif over>0:
        print(len(rate),len(rate)+1)
    else:
        print(len(rate),len(rate))
else:
    if over>1:
        print(1,2)
    else:
        print(1,1)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
a = list(map(int, input().split()))
over = 0
rate = set()
for x in a:
    if 399>=x>=1:
        rate.add(1)
    elif 799>=x>=400:
        rate.add(2)
    elif 1199>=x>=800:
        rate.add(3)
    elif 1599>=x>=1200:
        rate.add(4)
    elif 1999>=x>=1600:
        rate.add(5)
    elif 2399>=x>=2000:
        rate.add(6)
    elif 2799>=x>=2400:
        rate.add(7)
    elif 3199>=x>=2800:
        rate.add(8)
    else:
        over += 1

if len(rate)==8:
    print(8,8)
elif len(rate)==7 and over>0:
    print(7,8)
elif over>1:
    print(len(rate),len(rate)+2)
elif over>0:
    print(len(rate),len(rate)+1)
else:
    print(len(rate),len(rate))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = input().split()
a = [int(m) for m in a]
rate = {}
for i in range(9):
    rate[i] = 0
for i in range(n):
    for rank in range(9):
        if rank == 0:
            if 1 <= a[i] <= 400 * (rank + 1) - 1:
                rate[rank] += 1
        elif 400 * rank <= a[i] <= 400 * (rank + 1) - 1:
            rate[rank] += 1
maxco = 0
minco = 0
for i in range(9):
    if rate[i] != 0:
        if i == 8:
            maxco += rate[i]
        else:
            maxco += 1
            minco += 1
print(minco, maxco)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = [int(i) for i in input().split()]

color = [0 for i in range(9)]
for i in range(n):
    if a[i] < 3200:
        color[int(a[i] / 400)] = 1
    else:
        color[-1] += 1
print("{} {}".format(
    max(sum(color[0:-1]), min(1, color[-1])),
    min(8, sum(color[0:-1])+color[-1])))

Submission status: Wrong Answer

Solution code:
N = int(input())
A = [int(i) for i in input().split()]
col = [0] * 8
red = 0
minn = 0
maxx = 0

for i in A:
    if i <= 399:
        col[0] = 1
    elif i <= 799:
        col[1] = 1
    elif i <= 1199:
        col[2] = 1
    elif i <= 1599:
        col[3] = 1
    elif i <= 1999:
        col[4] = 1
    elif i <= 2399:
        col[5] = 1
    elif i <= 2799:
        col[6] = 1
    elif i <= 3199:
        col[7] = 1
    else:
        red += 1
if red == 0:
    minn = sum(col)
    maxx = sum(col)
elif red >= 1 and sum(col) == 0:
    minn = 1
    maxx = min(8, red)
else:
    minn = sum(col)
    maxx = min(8, sum(col)+red)

print(minn, maxx)

Submission status: Wrong Answer

Solution code:
n = int(input())
rate_list = list(map(int, input().split()))
emp_list = [0]*9
for i in range(n):
    if  1 <= rate_list[i] <= 399:
        emp_list[0] = 1
    elif 400 <= rate_list[i] <= 799:
        emp_list[1] = 1
    elif 800 <= rate_list[i] <= 1199:
        emp_list[2] = 1        
    elif 1200 <= rate_list[i] <= 1599:
        emp_list[3] = 1        
    elif 1600 <= rate_list[i] <= 1999:
        emp_list[4] = 1        
    elif 2000 <= rate_list[i] <= 2399:
        emp_list[5] = 1        
    elif 2400 <= rate_list[i] <= 2799:
        emp_list[6] = 1        
    elif 2800 <= rate_list[i] <= 3199:
        emp_list[7] = 1        
    elif 3200 <= rate_list[i]:
        emp_list[8] += 1
sum_ = 0
for i in range(8):
    sum_ += emp_list[i]

print(sum_, end="")
print(" ", end="")
print(sum_+emp_list[8])

Submission status: Wrong Answer

Solution code:
n = int(input())
rate_list = list(map(int, input().split()))
emp_list = [0]*9
for i in range(n):
    if  1 <= rate_list[i] <= 399:
        emp_list[0] = 1
    elif 400 <= rate_list[i] <= 799:
        emp_list[1] = 1
    elif 800 <= rate_list[i] <= 1199:
        emp_list[2] = 1        
    elif 1200 <= rate_list[i] <= 1599:
        emp_list[3] = 1        
    elif 1600 <= rate_list[i] <= 1999:
        emp_list[4] = 1        
    elif 2000 <= rate_list[i] <= 2399:
        emp_list[5] = 1        
    elif 2400 <= rate_list[i] <= 2799:
        emp_list[6] = 1        
    elif 2800 <= rate_list[i] <= 3199:
        emp_list[7] = 1        
    elif 3200 <= rate_list[i]:
        emp_list[8] += 1
sum_ = 0
for i in range(8):
    sum_ += emp_list[i]
if sum_ == 8:
    print(8, end="")
    print(" ", end="")
    print(8)
else:
    print(sum_, end="")
    print(" ", end="")
    print(sum_+emp_list[8])

Submission status: Wrong Answer

Solution code:
n = int(input())
rate_list = list(map(int, input().split()))
emp_list = [0]*9
for i in range(n):
    if  1 <= rate_list[i] <= 399:
        emp_list[0] = 1
    elif 400 <= rate_list[i] <= 799:
        emp_list[1] = 1
    elif 800 <= rate_list[i] <= 1199:
        emp_list[2] = 1        
    elif 1200 <= rate_list[i] <= 1599:
        emp_list[3] = 1        
    elif 1600 <= rate_list[i] <= 1999:
        emp_list[4] = 1        
    elif 2000 <= rate_list[i] <= 2399:
        emp_list[5] = 1        
    elif 2400 <= rate_list[i] <= 2799:
        emp_list[6] = 1        
    elif 2800 <= rate_list[i] <= 3199:
        emp_list[7] = 1        
    elif 3200 <= rate_list[i]:
        emp_list[8] += 1
sum_ = 0
for i in range(8):
    sum_ += emp_list[i]
if sum_ == 8:
    print(8, end="")
    print(" ", end="")
    print(8)
else:
    print(sum_, end="")
    print(" ", end="")
    print(min(sum_+emp_list[8], 8))

Submission status: Wrong Answer

Solution code:
n=int(input())
A=list(map(int,input().split()))
count=[0,0,0,0,0,0,0,0]
change =0
for a in A:
    if a<400:
        count[0]=1
    elif a<800:
        count[1] =1
    elif a<1200:
        count[2] =1
    elif a<1600:
        count[3] =1
    elif a<2000:
        count[4] =1
    elif a<2400:
        count[5] =1
    elif a<2800:
        count[6] =1
    elif a<3200:
        count[7] =1
    else:
        change +=1
Min=max(sum(count),1)
Max=min(sum(count) + change,8)
print(Min,Max)