AtCoder Beginner Contest 096

Submission #5443769

Source codeソースコード

def primes(n):
    ass = []
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    for i in range(len(is_prime)):
        if is_prime[i]:
            ass.append(i)
    return ass
    
N = int(input())
p = list(filter(lambda x:x%10 == 1, primes(55555)))
for i in range(N):
    print(p[i], end=" ")

Submission

Task問題 D - Five, Five Everywhere
User nameユーザ名 Haruyuk1
Created time投稿日時
Language言語 PyPy3 (2.4.0)
Status状態 AC
Score得点 400
Source lengthソースコード長 507 Byte
File nameファイル名
Exec time実行時間 173 ms
Memory usageメモリ使用量 39664 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 173 ms 39664 KB
in02.txt AC 172 ms 39408 KB
sample_01.txt AC 170 ms 39408 KB
sample_02.txt AC 170 ms 39408 KB
sample_03.txt AC 171 ms 39408 KB