AtCoder Beginner Contest 096

Submission #6111244

Source codeソースコード

def shave(n):
    n_root = int(n**0.5)
    candidate = [i for i in range(3,n+1,2)]
    for i in range(3,n_root+2,2):
        candidate = [ j for j in candidate if j == i or j % i != 0]   
    candidate = [2] + candidate
    return candidate

prime_list = (shave(55555))
prime_list = [ i for i in prime_list if i % 5 == 1]
n = int(input())


print(*prime_list[:n])

Submission

Task問題 D - Five, Five Everywhere
User nameユーザ名 ASTR1104
Created time投稿日時
Language言語 PyPy3 (2.4.0)
Status状態 AC
Score得点 400
Source lengthソースコード長 378 Byte
File nameファイル名
Exec time実行時間 201 ms
Memory usageメモリ使用量 41196 KB

Test case

Set

Set name Score得点 / Max score Cases
Sample - sample_01.txt,sample_02.txt,sample_03.txt
All 400 / 400 in01.txt,in02.txt,sample_01.txt,sample_02.txt,sample_03.txt

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
in01.txt AC 201 ms 41196 KB
in02.txt AC 196 ms 41068 KB
sample_01.txt AC 197 ms 41068 KB
sample_02.txt AC 199 ms 41068 KB
sample_03.txt AC 200 ms 41068 KB