Submission #5444992
Source Code Expand
N = int(input()) ans = [2] N -= 1 def is_prime(n): i = 2 prime = True while i * i <= n: if n % i == 0: prime = False break i += 1 return prime next_val = 3 for _ in range(N): while not is_prime(next_val): next_val += 5 ans.append(next_val) next_val += 5 print(*ans)
Submission Info
Submission Time | |
---|---|
Task | D - Five, Five Everywhere |
User | jikei |
Language | Python (3.4.3) |
Score | 400 |
Code Size | 367 Byte |
Status | AC |
Exec Time | 17 ms |
Memory | 3060 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 | 17 ms | 2940 KB |
in02.txt | AC | 17 ms | 3060 KB |
sample_01.txt | AC | 17 ms | 2940 KB |
sample_02.txt | AC | 17 ms | 2940 KB |
sample_03.txt | AC | 17 ms | 3060 KB |