Submission #5443769
Source Code Expand
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 Info
Submission Time | |
---|---|
Task | D - Five, Five Everywhere |
User | Haruyuk1 |
Language | PyPy3 (2.4.0) |
Score | 400 |
Code Size | 507 Byte |
Status | AC |
Exec Time | 173 ms |
Memory | 39664 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 400 / 400 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt, sample_03.txt |
All | in01.txt, in02.txt, sample_01.txt, sample_02.txt, sample_03.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
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 |