Submission #1254380
Source Code Expand
// clang-format off #include <bits/stdc++.h> #define int long long int #define main signed main() #define bye return 0 #define rep(i, n) for (int i = 0; i < (n); i++) #define loop(i, a, n) for (int i = (a); i < (n); i++) #define each(p, v) for (auto p = (v).begin(); p != (v).end(); p++) #define all(v) (v).begin(), (v).end() #define prec(n) fixed << setprecision(n) #define dump(x) cerr << "(L" << __LINE__ << ") " << #x << " = " << (x) << endl #define clr(x, a) memset(x, a, sizeof(x)) #define sum(v) accumulate(all(v), 0) #define stlice(s, l) substr(s, (s) + (l) + 1) #define odd(n) ((n) % 2) #define even(n) (!((n) % 2)) #define INF 1000000000 #define MOD 1000000007 #define pb push_back #define mp make_pair #define mt make_tuple #define fi first #define se second #define str string #define vi vector<int> #define vb vector<bool> #define vc vector<char> #define vs vector<str> using namespace std; // clang-format on main { int n; cin >> n; for (int i = 2; i * i <= n; i++) { if (n % i == 0) { cout << "NO" << endl; bye; } } cout << "YES" << endl; bye; }
Submission Info
Submission Time | |
---|---|
Task | A - 素数、コンテスト、素数 |
User | AyaMorisawa |
Language | C++14 (GCC 5.4.1) |
Score | 100 |
Code Size | 1151 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 256 KB |
Judge Result
Set Name | All | ||
---|---|---|---|
Score / Max Score | 100 / 100 | ||
Status |
|
Set Name | Test Cases |
---|---|
All | 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 00_sample_04.txt, 01_test_01.txt, 01_test_02.txt, 01_test_03.txt, 01_test_04.txt, 01_test_05.txt, 01_test_06.txt, 01_test_07.txt, 01_test_08.txt, 01_test_09.txt, 01_test_10.txt, 01_test_11.txt, 01_test_12.txt, 01_test_13.txt, 01_test_14.txt, 01_test_15.txt, 01_test_16.txt, 01_test_17.txt, 01_test_18.txt, 01_test_19.txt, 01_test_20.txt, 01_test_21.txt, 01_test_22.txt, 01_test_23.txt, 01_test_24.txt, 01_test_25.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_01.txt | AC | 1 ms | 256 KB |
00_sample_02.txt | AC | 1 ms | 256 KB |
00_sample_03.txt | AC | 1 ms | 256 KB |
00_sample_04.txt | AC | 1 ms | 256 KB |
01_test_01.txt | AC | 1 ms | 256 KB |
01_test_02.txt | AC | 1 ms | 256 KB |
01_test_03.txt | AC | 1 ms | 256 KB |
01_test_04.txt | AC | 1 ms | 256 KB |
01_test_05.txt | AC | 1 ms | 256 KB |
01_test_06.txt | AC | 1 ms | 256 KB |
01_test_07.txt | AC | 1 ms | 256 KB |
01_test_08.txt | AC | 1 ms | 256 KB |
01_test_09.txt | AC | 1 ms | 256 KB |
01_test_10.txt | AC | 1 ms | 256 KB |
01_test_11.txt | AC | 1 ms | 256 KB |
01_test_12.txt | AC | 1 ms | 256 KB |
01_test_13.txt | AC | 1 ms | 256 KB |
01_test_14.txt | AC | 1 ms | 256 KB |
01_test_15.txt | AC | 1 ms | 256 KB |
01_test_16.txt | AC | 1 ms | 256 KB |
01_test_17.txt | AC | 1 ms | 256 KB |
01_test_18.txt | AC | 1 ms | 256 KB |
01_test_19.txt | AC | 1 ms | 256 KB |
01_test_20.txt | AC | 1 ms | 256 KB |
01_test_21.txt | AC | 1 ms | 256 KB |
01_test_22.txt | AC | 1 ms | 256 KB |
01_test_23.txt | AC | 1 ms | 256 KB |
01_test_24.txt | AC | 1 ms | 256 KB |
01_test_25.txt | AC | 1 ms | 256 KB |