Submission #2444746
Source Code Expand
#include <iostream> using namespace std; bool isprime(int p) { if (p == 1) return false; for (int i = 2; i < p; i++) { if (p%i == 0) return false; } return true; } int n; int main() { cin >> n; for (int i = 31; i <= 55555; i += 30) { if (isprime(i) == true) { if (i != 31) cout << " "; cout << i; n--; } if (n == 0) break; } cout << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | D - Five, Five Everywhere |
User | E869120 |
Language | C++14 (GCC 5.4.1) |
Score | 400 |
Code Size | 400 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 256 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 | 256 KB |
in02.txt | AC | 1 ms | 256 KB |
sample_01.txt | AC | 1 ms | 256 KB |
sample_02.txt | AC | 1 ms | 256 KB |
sample_03.txt | AC | 1 ms | 256 KB |