Submission #1777496


Source Code Expand

num = int(input())

rate = [int(x) for x in input().split()]

dict = {"rainbow":0, "red":0, "orange":0, "yellow":0, "blue":0, "water":0, "green":0, "brown":0, "gray":0}
for i in rate:
    if i >= 3200:
        dict["rainbow"] += 1
    elif i >= 2800:
        dict["red"] = 1
    elif i >= 2400:
        dict["orange"]= 1
    elif i >= 2000:
        dict["yellow"] = 1
    elif i >= 1600:
        dict["blue"] += 1
    elif i >= 1200:
        dict["water"] = 1
    elif i >= 800:
        dict["green"] = 1
    elif i >= 400:
        dict["brown"] = 1
    elif i >= 0:
        dict["gray"] = 1

color = 0
rainbow = 0
for item, value in dict.items():
    if value > 0 and item != "rainbow":
        color += 1

color_min = color if color != 0 else 1
color_max = color if dict["rainbow"] == 0 else color + dict["rainbow"]

if color_max > 8:
    color_max = 8

print(color_min, color_max)

Submission Info

Submission Time
Task C - Colorful Leaderboard
User T_M
Language Python (3.4.3)
Score 0
Code Size 922 Byte
Status WA
Exec Time 18 ms
Memory 3064 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 3
AC × 6
WA × 2
Set Name Test Cases
Sample s1.txt, s2.txt, s3.txt
All in1.txt, in2.txt, in3.txt, in4.txt, in5.txt, s1.txt, s2.txt, s3.txt
Case Name Status Exec Time Memory
in1.txt AC 18 ms 3064 KB
in2.txt AC 18 ms 3064 KB
in3.txt WA 18 ms 3064 KB
in4.txt WA 18 ms 3064 KB
in5.txt AC 18 ms 3064 KB
s1.txt AC 18 ms 3064 KB
s2.txt AC 18 ms 3064 KB
s3.txt AC 18 ms 3064 KB