-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathC.py
More file actions
34 lines (33 loc) · 676 Bytes
/
C.py
File metadata and controls
34 lines (33 loc) · 676 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
def color_judge(n):
if 1<=n<=399:
return 'gray'
elif n<=799:
return 'brown'
elif n<=1199:
return 'green'
elif n<=1599:
return 'light blue'
elif n<=1999:
return 'blue'
elif n<=2399:
return 'yellow'
elif n<=2799:
return 'orange'
elif n<=3199:
return 'red'
else:
return 'choice'
n = int(input())
a = list(map(int, input().split()))
dic = {}
for i in a:
if dic.get(color_judge(i)):
dic[color_judge(i)] += 1
else:
dic[color_judge(i)] = 1
choice = 0
l = len(dic)
if dic.get('choice'):
choice = dic['choice']
l -= 1
print(max(1, l), l+choice)