Submission #6003355
Source Code Expand
def eratosthenes(n): prime = [] limit = n**0.5 numbers = [i for i in range(2,n+1)] while True: p = numbers[0] if limit <= p: return prime + numbers prime.append(p) numbers = [i for i in numbers if i%p != 0] return prime prime = eratosthenes(55555) r1 = [] for p in prime: if p%5==1: r1.append(p) r1 = [str(p) for p in r1][:int(input())] print(' '.join(r1))
Submission Info
Submission Time | |
---|---|
Task | D - Five, Five Everywhere |
User | charmq |
Language | Python (3.4.3) |
Score | 400 |
Code Size | 451 Byte |
Status | AC |
Exec Time | 58 ms |
Memory | 5528 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 | 58 ms | 5492 KB |
in02.txt | AC | 58 ms | 5528 KB |
sample_01.txt | AC | 58 ms | 5528 KB |
sample_02.txt | AC | 58 ms | 5528 KB |
sample_03.txt | AC | 58 ms | 5528 KB |