Buggy python submission (verdict: Runtime Error):
def c():
    n = int(input())
    a = list(map(int, input().split()))
    l = list(map(lambda i: min(8, i//400), a))
    over_rate = l.count(8)
    res = set(l)
    try: res.remove(8)

    mi = max(1, len(res))
    ma = len(res) + over_rate
    print(mi, ma)

c()

Fixed submission:
def c():
    n = int(input())
    a = list(map(int, input().split()))
    x = []
    def set_col(rate):
        if rate <= 399:
            return '灰色'
        elif rate <= 799:
            return '茶色'
        elif rate <= 1199:
            return '緑色'
        elif rate <= 1599:
            return '水色'
        elif rate <= 1999:
            return '青色'
        elif rate <= 2399:
            return '黄色'
        elif rate <= 2799:
            return '橙色'
        elif rate <= 3199:
            return '赤色'
        else:
            x.append(1)
            return

    res = set(map(set_col, a))
    if None in res: res.remove(None)
    mi = max(1, len(res))
    ma = len(res) + len(x)
    print(mi, ma)

c()

Buggy python submission (verdict: Runtime Error):
def c():
    n = int(input())
    a = list(map(int, input().split()))
    l = list(map(lambda i: min(8, i//400), a))
    over_rate = l.count(8)
    res = set(l)
    try: res.remove(8)

    mi = max(1, len(res))
    ma = len(res) + over_rate
    print(mi, ma)


Fixed submission:
def c():
    n = int(input())
    a = list(map(int, input().split()))
    x = []
    def set_col(rate):
        if rate <= 399:
            return '灰色'
        elif rate <= 799:
            return '茶色'
        elif rate <= 1199:
            return '緑色'
        elif rate <= 1599:
            return '水色'
        elif rate <= 1999:
            return '青色'
        elif rate <= 2399:
            return '黄色'
        elif rate <= 2799:
            return '橙色'
        elif rate <= 3199:
            return '赤色'
        else:
            x.append(1)
            return

    res = set(map(set_col, a))
    if None in res: res.remove(None)
    mi = max(1, len(res))
    ma = len(res) + len(x)
    print(mi, ma)

c()

Buggy python submission (verdict: Runtime Error):
def c():
    n = int(input())
    a = list(map(int, input().split()))
    x = []
    def set_col(rate):
        if rate <= 399:
            return '灰色'
        elif rate <= 799:
            return '茶色'
        elif rate <= 1199:
            return '緑色'
        elif rate <= 1599:
            return '水色'
        elif rate <= 1999:
            return '青色'
        elif rate <= 2399:
            return '黄色'
        elif rate <= 2799:
            return '橙色'
        elif rate <= 3199:
            return '赤色'
        else:
            x.append(1)
            return

    res = set(map(set_col, a))
    res.remove(None)
    mi = max(1, len(res))
    ma = len(res) + len(x)
    print(mi, ma)

c()

Fixed submission:
def c():
    n = int(input())
    a = list(map(int, input().split()))
    x = []
    def set_col(rate):
        if rate <= 399:
            return '灰色'
        elif rate <= 799:
            return '茶色'
        elif rate <= 1199:
            return '緑色'
        elif rate <= 1599:
            return '水色'
        elif rate <= 1999:
            return '青色'
        elif rate <= 2399:
            return '黄色'
        elif rate <= 2799:
            return '橙色'
        elif rate <= 3199:
            return '赤色'
        else:
            x.append(1)
            return

    res = set(map(set_col, a))
    if None in res: res.remove(None)
    mi = max(1, len(res))
    ma = len(res) + len(x)
    print(mi, ma)

c()

Buggy python submission (verdict: Runtime Error):

def c():
    n = int(input())
    a = list(map(int, input().split()))
    x = []
    def set_col(rate):
        if 1 <= rate <= 399:
            return '灰色'
        elif 400 <= rate <= 799:
            return '茶色'
        elif 800 <= rate <= 1199:
            return '緑色'
        elif 1200 <= rate <= 1599:
            return '水色'
        elif 1600 <= rate <= 1999:
            return '青色'
        elif 2000 <= rate <= 2399:
            return '黄色'
        elif 2400 <= rate <= 2799:
            return '橙色'
        elif 2800 <= rate <= 3199:
            return '赤色'
        else:
            x.append(1)
            return

    res = set(map(set_col, a))
    res.remove(None)
    mi = max(1, len(res))
    ma = min(8, len(res) + len(x)) # maximum color 8
    print(mi, ma)

c()


Fixed submission:
def c():
    n = int(input())
    a = list(map(int, input().split()))
    x = []
    def set_col(rate):
        if rate <= 399:
            return '灰色'
        elif rate <= 799:
            return '茶色'
        elif rate <= 1199:
            return '緑色'
        elif rate <= 1599:
            return '水色'
        elif rate <= 1999:
            return '青色'
        elif rate <= 2399:
            return '黄色'
        elif rate <= 2799:
            return '橙色'
        elif rate <= 3199:
            return '赤色'
        else:
            x.append(1)
            return

    res = set(map(set_col, a))
    if None in res: res.remove(None)
    mi = max(1, len(res))
    ma = len(res) + len(x)
    print(mi, ma)

c()