AtCoder Beginner Contest 064

Submission #1342283

Source codeソースコード

import numpy as np
N = int(input())
a = np.array([int(n) for n in input().split()])
colors = 0
pro = 0
for l, u in ((1, 399), (400, 799), (800,1199), (1200,1599), (1600,1999), (2000,2399), (2400,2799), (2800, 3199)):
    colors += ((a >= l) & (a <= u)).sum() > 0
pro = (a >= 3200).sum()
l = colors if colors > 0 else min(1, pro)
u = colors+pro
print("%d %d"%(l, u))

Submission

Task問題 C - Colorful Leaderboard
User nameユーザ名 htkb
Created time投稿日時
Language言語 Python3 (3.4.3)
Status状態 AC
Score得点 300
Source lengthソースコード長 375 Byte
File nameファイル名
Exec time実行時間 528 ms
Memory usageメモリ使用量 18628 KB

Test case

Set

Set name Score得点 / Max score Cases
Sample - s1.txt,s2.txt,s3.txt
All 300 / 300 in1.txt,in2.txt,in3.txt,in4.txt,in5.txt,s1.txt,s2.txt,s3.txt

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
in1.txt AC 528 ms 18628 KB
in2.txt AC 157 ms 12400 KB
in3.txt AC 154 ms 12304 KB
in4.txt AC 157 ms 12304 KB
in5.txt AC 153 ms 12216 KB
s1.txt AC 155 ms 12400 KB
s2.txt AC 155 ms 12176 KB
s3.txt AC 156 ms 12400 KB