Submission #1607532
Source Code Expand
b = {} b['gray'] = 0 b['brown'] = 0 b['green'] = 0 b['cyan'] = 0 b['blue'] = 0 b['yellow'] = 0 b['orange'] = 0 b['red'] = 0 b['other'] = 0 n = int(input()) a = list(map(int,input().split())) for ai in a: if ai < 400: b['gray'] += 1 elif ai < 800: b['brown'] += 1 elif ai < 1200: b['green'] += 1 elif ai < 1600: b['cyan'] += 1 elif ai < 2000: b['blue'] += 1 elif ai < 2400: b['yellow'] += 1 elif ai < 2800: b['orange'] += 1 elif ai < 3200: b['red'] += 1 else: b['other'] += 1 ans = 0 for k, v in b.items(): if k != 'other' and v > 0: ans += 1 if ans == 0: print(1, b['other']) else: print(ans, ans + b['other'])
Submission Info
Submission Time | |
---|---|
Task | C - Colorful Leaderboard |
User | ophelia |
Language | Python (3.4.3) |
Score | 300 |
Code Size | 786 Byte |
Status | AC |
Exec Time | 17 ms |
Memory | 3064 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 300 | ||||
Status |
|
|
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 | 17 ms | 3064 KB |
in2.txt | AC | 17 ms | 3064 KB |
in3.txt | AC | 17 ms | 3064 KB |
in4.txt | AC | 17 ms | 3064 KB |
in5.txt | AC | 17 ms | 3064 KB |
s1.txt | AC | 17 ms | 3064 KB |
s2.txt | AC | 17 ms | 3064 KB |
s3.txt | AC | 17 ms | 3064 KB |