Buggy python submission (verdict: Runtime Error):
N = int(input())
lst_a = list(map(int, input().split()))
lst_color = [0] * 8
cnt_super = 0


for a in lst_a:
    i = a // 400
    if i == 8:
        cnt_super += 1
    else:
        lst_color[i] = 1
cnt_existed = sum(1 for x in lst_color if x!=0)


ans_min = max(cnt_existed, 1)
ans_max = cnt_existed + cnt_super


print(ans_min, ans_max)

Fixed submission:
N = int(input())
lst_a = list(map(int, input().split()))
lst_color = [0] * 8
cnt_super = 0


for a in lst_a:
    if 1 <= a <= 399:
        lst_color[0] += 1
    elif 400 <= a <= 799:
        lst_color[1] += 1
    elif 800 <= a <= 1199:
        lst_color[2] += 1
    elif 1200 <= a <= 1599:
        lst_color[3] += 1
    elif 1600 <= a <= 1999:
        lst_color[4] += 1
    elif 2000 <= a <= 2399:
        lst_color[5] += 1
    elif 2400 <= a <= 2799:
        lst_color[6] += 1
    elif 2800 <= a <= 3199:
        lst_color[7] += 1
    else:
        cnt_super += 1
cnt_existed = sum(1 for x in lst_color if x!=0)


if cnt_existed == 0:
    ans_min = 1
    ans_max = cnt_super
else:
    ans_min = cnt_existed
    ans_max = cnt_existed + cnt_super


print(ans_min, ans_max)

Buggy python submission (verdict: Runtime Error):
N = int(input())
lst_a = list(map(int, input().split()))
lst_color = [0] * 8
cnt_super = 0


for a in lst_a:
    i = int(a / 400)
    if i == 8:
        cnt_super += 1
    else:
        lst_color[i] += 1
cnt_existed = sum(1 for x in lst_color if x!=0)


ans_min = max(cnt_existed, 1)
ans_max = cnt_existed + cnt_super


print(ans_min, ans_max)

Fixed submission:
N = int(input())
lst_a = list(map(int, input().split()))
lst_color = [0] * 8
cnt_super = 0


for a in lst_a:
    if 1 <= a <= 399:
        lst_color[0] += 1
    elif 400 <= a <= 799:
        lst_color[1] += 1
    elif 800 <= a <= 1199:
        lst_color[2] += 1
    elif 1200 <= a <= 1599:
        lst_color[3] += 1
    elif 1600 <= a <= 1999:
        lst_color[4] += 1
    elif 2000 <= a <= 2399:
        lst_color[5] += 1
    elif 2400 <= a <= 2799:
        lst_color[6] += 1
    elif 2800 <= a <= 3199:
        lst_color[7] += 1
    else:
        cnt_super += 1
cnt_existed = sum(1 for x in lst_color if x!=0)


if cnt_existed == 0:
    ans_min = 1
    ans_max = cnt_super
else:
    ans_min = cnt_existed
    ans_max = cnt_existed + cnt_super


print(ans_min, ans_max)

Buggy python submission (verdict: Runtime Error):
N = int(input())
lst_a = list(map(int, input().split()))
lst_color = [0] * 8
cnt_super = 0


for a in lst_a:
    i = a // 400
    if i == 8:
        cnt_super += 1
    else:
        lst_color[i] += 1
cnt_existed = sum(1 for x in lst_color if x!=0)


ans_min = max(cnt_existed, 1)
ans_max = cnt_existed + cnt_super


print(ans_min, ans_max)

Fixed submission:
N = int(input())
lst_a = list(map(int, input().split()))
lst_color = [0] * 8
cnt_super = 0


for a in lst_a:
    if 1 <= a <= 399:
        lst_color[0] += 1
    elif 400 <= a <= 799:
        lst_color[1] += 1
    elif 800 <= a <= 1199:
        lst_color[2] += 1
    elif 1200 <= a <= 1599:
        lst_color[3] += 1
    elif 1600 <= a <= 1999:
        lst_color[4] += 1
    elif 2000 <= a <= 2399:
        lst_color[5] += 1
    elif 2400 <= a <= 2799:
        lst_color[6] += 1
    elif 2800 <= a <= 3199:
        lst_color[7] += 1
    else:
        cnt_super += 1
cnt_existed = sum(1 for x in lst_color if x!=0)


if cnt_existed == 0:
    ans_min = 1
    ans_max = cnt_super
else:
    ans_min = cnt_existed
    ans_max = cnt_existed + cnt_super


print(ans_min, ans_max)

Buggy python submission (verdict: Runtime Error):
N = int(input())
lst_a = list(map(int, input().split()))
lst_color = [0] * 8
cnt_super = 0


for a in lst_a:
    i = a // 400
    if i == 8:
        cnt_super += 1
    else:
        lst_color[i] += 1
cnt_existed = sum(1 for x in lst_color if x!=0)


ans_min = max(cnt_existed, 1)
ans_max = cnt_existed + cnt_super


print(ans_min, ans_max)

Fixed submission:
N = int(input())
lst_a = list(map(int, input().split()))
lst_color = [0] * 8
cnt_super = 0


for a in lst_a:
    if 1 <= a <= 399:
        lst_color[0] += 1
    elif 400 <= a <= 799:
        lst_color[1] += 1
    elif 800 <= a <= 1199:
        lst_color[2] += 1
    elif 1200 <= a <= 1599:
        lst_color[3] += 1
    elif 1600 <= a <= 1999:
        lst_color[4] += 1
    elif 2000 <= a <= 2399:
        lst_color[5] += 1
    elif 2400 <= a <= 2799:
        lst_color[6] += 1
    elif 2800 <= a <= 3199:
        lst_color[7] += 1
    else:
        cnt_super += 1
cnt_existed = sum(1 for x in lst_color if x!=0)


if cnt_existed == 0:
    ans_min = 1
    ans_max = cnt_super
else:
    ans_min = cnt_existed
    ans_max = cnt_existed + cnt_super


print(ans_min, ans_max)