Submission #5995438
Source Code Expand
#include <stdio.h> int main() { int n; int cnt = 0; scanf("%d", &n); for (int i = 1; i * 5 < 55555; i++) { int tmp = i * 5 + 1; int j = 2; while (j * j <= tmp && tmp % j != 0) { j++; } if (j * j > tmp) { if (cnt) putchar(' '); printf("%d", tmp); cnt++; } if (cnt >= n) break; } putchar('\n'); return 0; }
Submission Info
Submission Time | |
---|---|
Task | D - Five, Five Everywhere |
User | toyama |
Language | C (Clang 3.8.0) |
Score | 400 |
Code Size | 489 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 128 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 | 1 ms | 128 KB |
in02.txt | AC | 1 ms | 128 KB |
sample_01.txt | AC | 1 ms | 128 KB |
sample_02.txt | AC | 1 ms | 128 KB |
sample_03.txt | AC | 1 ms | 128 KB |